Thanks to all contributers who improved notistack by opening an issue/PR.
- @jordansexton Fix TypeScript bad import path #485
- Fix TypeScript cannot be used as a JSX constructor #485
- @ryancrunchi @vwalsh Fix TypeScript cannot be used as a JSX constructor #485
- @neporshiso Update TransitionComponent type for MUIv5 compatibility #474
- @suren-atoyan Add support for React 18 #482
- @h0tw4t3r Ensure
variant
classes are passed to SnackbarContent #451
- @hugofpsilva @ramosbugs @joemaffei Publish material-ui v5 compatible version as
latest
instead ofnext
#437
- @joshkel Support Collapse with root and container class keys #408
- @SimonAmphora Remove the need to use
!important
to customise variant styles #215 (comment)
- @angeshpc91 Fixes issues with centered snackbars on xs screen sizes #380
- @whytspace Multiple Snackbars always left aligned #373
- @rzmz Snackbars should have equal width on XS screens #367
- Prevent snackbars from having the same width #356
- @tarazena: Export missing SnackbarContent for TypeScript #354
- @gregorysl @lephleg @joaogardenberg Add support for React 17 #339
- Add support for MUI v5 #333
- @thierrysantos: EnqueueSnackbar supports snackbar with key zero #318
- Fix various typescript inconsistencies #319
- Drop
SnackbarContent
component andContentProps
props #297
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',
},
},
},
});
- @lukawsk: Allow autoHideDuration be null #273
- @nebojsanb: Fix bug with displaying snackbars #270
- @nebojsanb: Improve bundle size by removing
react-is
dependency #272
- Exclude
tsconfig.json
in the build #266
- @iinitz: Enforce white text for dark theme #241
- @fbarbare: Let Mat UI handle the font and border-radius #262
- @tomohiro-iwana @JuanmaMenendez: Fix bug with snackbar not being centered on
xs
screens #232 - Add new
containerRoot
class toSnackbarContainer
#263 - Use filled icons as default icon variant #265
- @mehmetkose @andrewmclagan @oliviertassinari @merceyz: Reduce Bundle size by using
clsx
instead ofclassnames
, Usebabel-plugin-optimize-clsx
#163 - @kikoanis Fix bug with custom variant
classes
#251 - Drop support for Material UI v3
- Migrate codebase to typescript.
- DASPRiD Directly return snackbar context in useSnackbar #223
- dalborgo Add support to set default variant on SnackbarProvider #180
- dalborgo Deprecate support for
children
inenqueueSnackbar
options.
- @svish: Correct enqueueSnackbar typing #217
- @dgczhh: Make sure
onClose
callback that's been passed through options parameter ofenqueueSnackbar
gets called when snackbar is closed usingcloseSnackbar
function #220 - @JoseLion: Add snackbar key to transition handler parameters. Fix transition handler callback types #214
- @PeterMK85: Add support for React portals #179
- @ly-vo: Pass
message
(as well askey
) incontent
prop callback #198 - @simonbos: Allow safe override of
TransitionProps
#194
- @JimmyMultani: Allow snackbar key
0
to be passed #187 - @williammetcalf: Allow preventDuplicate prop to be overridden by individual snackbar #188
- @simonbos: Fix
setState
race condition #189 - @kriim:
preventDuplicate
by comparing keys (if specified) #190
- @mehmetkose @oliviertassinari: Improve bundle size #163
- @Grabauskas: Make sure published package is free of trash #185
- @Brettm12345: Add support to close snackbar on click away #182
- @Brettm12345: Add support to globally customize the default snackbar #180
- @FredyC: Prevent snackbar processing on
SnackbarProvider
unmount #173 - @nick-cromwell: Allow customising snackbar container styles #172
@ryan-gray: Remove deprecated materila-ui spacing unit #169
@vyushin: Add support for resizable snackbars #164
@ProtectedVoid: Improves accessibility of snackbars #153
@YIZHUANG: Allow overriding some of iconVariant
s #136
@dgreuel: Bug fix - add prop-types to dependencies #139
@jhrinoa: Update prop-types versions in package.json #134
@eps1lon: Update peer dependency requirement for material-ui #119
@bcorbold: Add types
path to package.json
for better IDE support #124
- Fix minor bug with typescript definitions
#abd04cf
@alexisab: Add support to close all snackbars at once #122
@jgodi: Allow snackbar children to be of type function #114
@YBogomolov
- Add support for multiple action buttons #107
@jhrinoa @ds009 @lukejagodzinski
- Add support for
ref
usingReact.forwardRef
#84 - Add
hoist-non-react-statics
#111 - Capitalise - Rename
withSnackbarProps
interface toWithSnackbarProps
. #109
Thanks to all contributers who improved notistack by opening an issue/PR.
@Methuselah96 @VincentLanglet
- Remove duplicate
ClassNameMap
fromindex.d.ts
#104
Thanks to all contributers who improved notistack by opening an issue/PR.
@ecwyne @Lukas-Kullmann
- Completely deprecate and delete
onPresentSnackbar
method. - Add support for hooks
useSnackbar
#83 - Add
displayName
to components exported bywithSnackbar
HOC #100
Thanks to all contributers who improved notistack by opening an issue/PR.
@amakhrov
- Fix typing for
iconVariant
props #91
Thanks to all contributers who improved notistack by opening an issue/PR.
@cwbuecheler @mpash @khhan1993 @Fs00 @martinmckenna
- Rename
InjectedSnackbarProps
towithSnackbarProps
in type definitions #59 - Add new prop
dense
to allow dense margins for snackbars (suitable for mobiles) #58 - Improve performance and prevent unnecessary child re-rendering #39
Thanks to all contributers who improved notistack by opening an issue/PR.
@mckernanin @butchmarshall @VincentLanglet @oliviertassinari
- Move
classnames
andprop-types
todependencies
#72 - Add option to
preventDuplicate
snackbars from getting into the queue. #67 - Add option to
persist
a notification until dismissed #42 - Add persist option and call
onClose
callback withreason: maxsnack
when a snackbar is dismissed due to reaching maxSnack #62
Thanks to all contributers who improved notistack by opening an issue/PR.
@zsh1313 @james-cordeiro @xiromoreira
Thanks to all contributers who improved notistack by opening an issue/PR.
@james-cordeiro @steinbergh @sethduncan @martinmckenna
- Allow snackbar messages of type node to be passed in enqueueSnackbar #34
- Allow snackbars with different heights to be stacked without overlapping on others #35
- Improve typings #37
- Fix issue where we couldn't add custom variant icon of type string (like emojies).
Thanks to all contributers who improved notistack by opening an issue/PR.
@nowaalex @nocksapp @nijk @ysgk
- Add support for
onExited
andonClose
props. #21 - Add support to pass
children
viaenqueueSnackbar
. #23 - Support for enqueueing multiple snackbars at once. #14
- Fix bug "Uncaught Error". #26
Thanks to all contributers who improved notistack by opening an issue/PR.
@BornaP @pantharshit00
- Fix bug where user couldn't apply css classes to mui-Snackbar
classes.root
. #11 - Smaller default icon variants so they don't make snackbars larger in height.
- Remove material-ui Typography
v2
warnings. #19
-
More customisation:
- New prop hideIconVariant to hide iconVariant.
- Set variant of a snackbar to default, (which is the default value) and you'll have a naked snackbar ready to be customised.
- Using classes property, specify the styles applied to snackbars when variant is set to success, error, warning or info,
-
Support for actions:
- Add action to all of the snackbars, or an individual snackbar.
-
New feature:
- Customise snackbars individually, by options parameter of enqueueSnackbar method.