v6.7.0
·
165 commits
to master
since this release
The theme types have been reworked to provide better direction on usage of the existing theme values or adding/overriding values.
Themeis a very generic interface defining the expected shape/tokens of a themeDefaultThemeextendsThemeand provides better direction on what appearances/sizes thedefaultThemehasuseTheme()is now generic (set toDefaultThemeunless otherwise specified)- Similarly,
ThemeContextis now generic, and a custom typed version of it can be retrieved with the new exported functiongetThemeContext()(set toDefaultThemeunless otherwise specified) - A new utility function,
mergeTheme, has been provided to deeply merge properties onto a destination theme, which can be useful if you're only looking to add or override a few values from thedefaultTheme
For examples on usage, check out the index.d.ts test file or the description of #1382