We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, we export our theme configuration and our custom color themes (dark/light)
We also export createTheme to allow other projects creating their own theme or completely overriding the ones we produced.
createTheme
❎ We do not export a simple way to extend our already defined dark and light themes.
From stitches doc, I see no way to extend themes.
They only show how to extend the default theme returned by createStitches with createTheme.
createStitches
import customThemeConfig from './CustomElement.themes.ts'; const CustomElement: () => JSX.Element = ...; const customElementTheme = createTheme(..., { ...customThemeConfig, // somehow we add the custom theme config }); const CustomElementWithTheme = () => { return ( <div className={customElementTheme}> <CustomElement /> </div> ); } export default CustomElementWithTheme
I fear we might lose dark/light themes for the specific component's context to gain our custom config.
NB: I don't really like this option so far.
export const extendTheme: (existingTheme: 'dark' | 'light') => ReturnType<typeof createTheme>
The text was updated successfully, but these errors were encountered:
matthieuh
paulocfjunior
gndz07
No branches or pull requests
Goals
Background
Currently, we export our theme configuration and our custom color themes (dark/light)
We also export
createTheme
to allow other projects creating their own theme or completely overriding the ones we produced.❎ We do not export a simple way to extend our already defined dark and light themes.
From stitches doc, I see no way to extend themes.
They only show how to extend the default theme returned by
createStitches
withcreateTheme
.Proposals
I fear we might lose dark/light themes for the specific component's context to gain our custom config.
NB: I don't really like this option so far.
The text was updated successfully, but these errors were encountered: