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
feat(styles): add theme extension support and improve nested theme composition
- Add support for extending FusionTheme with custom properties using generics
- Enhance createTheme to accept optional baseTheme parameter for nested themes
- Improve deep merging to properly handle StyleProperty instances and Record types
- Export ThemeProviderProps and StylesProviderProps interfaces for better TypeScript support
- Add explicit exports for createTheme, FusionTheme, and StyleDefinition
- Update tests to use createTheme instead of plain objects
- Fix theme merging in nested ThemeProvider scenarios
All changes are backward compatible.
Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com>
-**Deep Merging Improvements**: Enhanced `deepMerge` function properly handles nested theme properties, `Record` types, and `StyleProperty` instances
21
+
-**Type Exports**: Explicitly exported `ThemeProviderProps`, `StylesProviderProps`, `FusionTheme`, `StyleDefinition`, and `createTheme` for better TypeScript support
22
+
23
+
### Changed
24
+
25
+
-`createTheme` signature now accepts optional `baseTheme` parameter (backward compatible)
26
+
- Improved type inference for extended themes in `ThemeProvider`, `useTheme`, and `makeStyles`
27
+
- Better handling of nested theme composition when using theme functions in nested `ThemeProvider` components
28
+
29
+
### Technical Details
30
+
31
+
- Deep merging now correctly handles `StyleProperty` instances (replaces instead of merging)
32
+
- Theme composition works correctly with nested `ThemeProvider` components
0 commit comments