-
-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Now that the Context API is available in Atomico, it would be very nice to be able to pass callbacks to component.styles
.
Describe the solution you'd like
I would like to support the following:
const Button: Component = () => {
// ...
}
Button.styles = [
({ theme }) => css`
:host {
color: ${theme.colors.brand};
}
`,
];
I know there are CSS variables, but as we share our theme with React Native components we cannot use CSS variables. And besides that our theme contains a lot more than just colors, there are even objects containing text styles or shadows.
The question is, how to tell the Button
component above to use ThemeContext
?!
Maybe:
Button.context = ThemeContext;
or even:
Button.styles = [
ThemeContext,
({ theme }) => css`
...
`,
];
UpperCod
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request