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
The props are complex and difficult to use.
The complexity should be extracted to a separate function and exported separately to the ThemeProvider, The provider should just take full themes.
The api should allow simpler overriding of elements of the theme without having to supply everything. There should be options to override in both themes and separately in the light and the dark.
Ideas
const {light, dark} = createCommittedThemes() // default committed setup
const {light, dark} = createMaterialThemes() // a way to return to near material defaults
// To simply override a single element of both themes use a `common` key - rest deep merged
const const {light, dark} = createCommittedThemes({ common: {fonts: { fontSize: 20 }}})
// To override using default styles
const const {light, dark} = createCommittedThemes({ common: {fonts: (fontDefaults) => ({ ...fontDefaults: typography: fontDefaults.text }}})
// For different light/dark config use `light` and `dark` keys
const const {light, dark} = createCommittedThemes({light: {}, dark: {}})
@jonnyelliot could you have a read of this proposal and validate it for me - or suggest further improvement. No need to do it, just check you think this would be a sensible improvement to make.
I guess we will have to be clear what the behaviour is when things are omitted. If createCommittedThemes and createMaterialThemes are always able to deep merge then thats not a problem.
The props are complex and difficult to use.
The complexity should be extracted to a separate function and exported separately to the ThemeProvider, The provider should just take full themes.
The api should allow simpler overriding of elements of the theme without having to supply everything. There should be options to override in both themes and separately in the light and the dark.
Ideas
e.g. Typing
The text was updated successfully, but these errors were encountered: