Create theme helpers lib
In order to not have to import ui
in order to use a function as simple as th
, we could create a micro library called theme-helpers
that provides helper functions.
What could go in it:
- The
th
function that currently exists inui
. - The
scaling
function that currently exists in the coko theme. - A darken/lighten function for changing colors dynamically.
- Reusable bits of CSS.
A CSS example:
I currently have a block of CSS that adds a transition to an underline (a bit tricky, as text-decoration doesn't take transitions).
This bit could be applied to any component if you add eg. an ${underlineFade}
line to your styled component.
Other bits of CSS could be animations, along the lines of the "create submission" icon spinning in the collabra dashboard.
But really, anything that is reusable on the styling front, so that it can be used on the themes and the components.
I'm sure we'll come up with more things to put in there over time.