Notistack: dismiss button

Created on 1 Oct 2018  路  4Comments  路  Source: iamhosseindhv/notistack

Thanks for the amazing feature.

One thing, I would like to dimiss the snack bar like in material-ui, action props

action={[
,
key="close"
aria-label="Close"
color="inherit"
className={classes.close}
onClick={this.handleClose}
>

,
]}

Can I accomplish this?

enhancement must have

Most helpful comment

@BornaP @seannguyn Happy to announce that notistack v0.3.0 has been released and the following has been added:

1. More customisation:

  • [x] New prop hideIconVariant to hide iconVariant.
  • [x] Set variant of a snackbar to default, (which is the default value) and you'll have a naked snackbar ready to be customised.
  • [x] Using classes property, specify the styles applied to snackbars when variant is set to success, error, warning or info,

2. Support for actions:

  • [x] Add action to all of the snackbars, or an individual snackbar.

3. New feature:

  • [x] Customise snackbars individually, by options parameter of enqueueSnackbar method.

All 4 comments

As it says in README feature list, it's still not supported. I'm interesting on making PR for this. @iamhosseindhv any advice in particular?

@BornaP @seannguyn I'm working on the next version of Notistack to do only one thing: stack snackbars. It should be merely an extention.

However, at the moment we're forcing the user to push one of the four (success, error, warning, info) variants of a snackbar. This is a nice, handy feature that should be optional. The same goes with customising actions of a snackbar.

Any suggestion / PR is welcome but this improvement is in progress and will be soon out.

@iamhosseindhv thanks for heads up. In that case my work would be redundant so I guess it's better to wait for new version. Thumbs up for making Notistack more focused on solving main issue, as it's supposed to.

@BornaP @seannguyn Happy to announce that notistack v0.3.0 has been released and the following has been added:

1. More customisation:

  • [x] New prop hideIconVariant to hide iconVariant.
  • [x] Set variant of a snackbar to default, (which is the default value) and you'll have a naked snackbar ready to be customised.
  • [x] Using classes property, specify the styles applied to snackbars when variant is set to success, error, warning or info,

2. Support for actions:

  • [x] Add action to all of the snackbars, or an individual snackbar.

3. New feature:

  • [x] Customise snackbars individually, by options parameter of enqueueSnackbar method.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ksavery picture ksavery  路  3Comments

iamhosseindhv picture iamhosseindhv  路  8Comments

RastislavMirek picture RastislavMirek  路  8Comments

Gareon picture Gareon  路  3Comments

njetsy picture njetsy  路  6Comments