notistack v1.0.0 Release Notes
-
August 22, 2020
- โฌ๏ธ Drop
SnackbarContent
component andContentProps
props #297 #### ๐ฅ Breaking Changes className
prop is now used to customise styles applied to the content of snackbar (e.g. backgroundColor).๐ If you were using
className
to apply styles toSnackbar
component, you should now do so usingclasses.root
.<SnackbarProvider - className={classes.snackbar} + classes={{ + root: classes.snackbar + }} >
๐
ContentProps
prop is not supported anymore. Here are alternative ways to pass the same data to snackbar component. For any other scenario, you should pass you own custom content.<SnackbarProvider - ContentProps={{ - action: () => <button>dismiss</button>, - 'aria-describedby': 'some-value', - }} + action={() => <button>dismiss</button>} + ariaAttributes={{ + 'aria-describedby': 'some-value' + }} >
๐ป If you have customised
MuiSnackbarContent
through Material-UItheme
object, these changes won't automatically reflect within notistack. You can however, useclassName
prop to apply your customisations.
const theme = createMuiTheme({ overrides: { // no effect within notistack MuiSnackbarContent: { root: { fontSize: '1rem', }, }, }, });
- โฌ๏ธ Drop