jss-plugin-extend
Advanced tools
Changelog
10.7.1 (2021-6-28)
Changelog
10.6.0 (2021-3-14)
globalThis
to support secure version of JavaScript called SES 1449Styles
now supports ClassNames
, Props
/Data
, and Theme
as type parameters (eg. Styles<Names, Data, Theme>
). 1460withStyles
and createUseStyles
now support ClassNames
, Props
, and Theme
as type parameters (eg. createUseStyles<Names, Props, Theme>
). 1460useStyles
finally expects the correct argument type: a Props
object with an optional Theme
property (both determined from createUseStyles
). 1460classes
prop in withStyles()
1428Theme
is no longer the first generic type parameter for createUseStyles
. 1460
Theme
's type without reaching over the other type parameters:Using the function argument.
const useStyles = createUseStyles(theme: Theme => ({
ruleName: { /* ... */ };
}))
Using the object argument with a function. (You will only need to specify the Theme
type once.)
const useStyles = createUseStyles({
ruleName: ({theme}: {theme: Theme}) => ({
/* ... */
})
})
Changelog
10.1.1 (2020-3-15)
getDynamicStyles
migration introduced in 10.1.0Changelog
10.1.0 (2020-3-15)
getDynamicStyles
utility function was originally exposed from jss
package, but I don't think it was used externally, so I moved it to react-jss
package and made it internal. If you have been using it as public API let me know, we will have to revert the change.