You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.
🐛 smooth-ui should accept xstyled theme specification for text
Default component's color should take value from the theme object. All the variants should also inherit the "text" color from theme object and then overrides its own variant color
consttheme={colorMode: "dark",colors: {text: "red",// in light mode : text color should be redbackground: "#fff",primary: "green",modes: {dark: {text: "yellow",// in dark mode : text color should be yellowbackground: "#000",primary: "blue"}}}};
The text was updated successfully, but these errors were encountered:
siva3378
changed the title
smooth-ui should accept xstyled theme specification
smooth-ui should accept xstyled theme specification for text
Mar 16, 2020
I found a way to deal with this at the moment by providing colour prop to the Text component and managing that colour in the theme. For example color="primary".
exportdefaultfunctionApp(){return(<divclassName="App"><ThemeProvidertheme={theme}><Box><Textvariant="h1">Heading 1 text</Text><Textcolor="primary">Default text</Text> /* text color gets switched as per mode*/
<br/><br/><Button>Test button</Button></Box></ThemeProvider></div>);}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🐛 smooth-ui should accept xstyled theme specification for text
Default component's color should take value from the theme object. All the variants should also inherit the "text" color from theme object and then overrides its own variant color
To Reproduce
Steps to reproduce the behaviour:
Add text key as per xstyled theme specification here: https://xstyled.dev/docs/color-modes/
Expected behaviour
light
<Text>
component should get color oftheme.text
dark
<Text>
component should get color oftheme.modes.dark.text
Link to reproduction
https://codesandbox.io/s/smooth-ui-theme-should-respect-xstyled-specifications-wlwzb
Paste the results here:
Dark mode
Light mode
The text was updated successfully, but these errors were encountered: