1.0.1 • Published 5 years ago

material-snackbar-supplier v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

material-snackbar-supplier

Implement with new react context api that help you use material-ui SnackBar anywhere in your react-components with no pain

Installation

Available as npm package.

npm install --save material-snackbar-supplier

-- or

yarn add material-snackbar-supplier

Usage

Wrap your root component with SnackBarSupplier and applying any options based on Snackbar. Then use provided HOC anywhere you need handle Snackbar.make sure you have installed @material-ui/core and @material-ui/icons

import { SnackBarSupplier } from 'material-snackbar-supplier';

<SnackBarSupplier settings={{ autoHideDuration: 1500 }}>
  <App />
</SnackBarSupplier>
import { withSnackBar } from 'material-snackbar-supplier';

class App {
  componentDidMount () {
    this.props.message({
      message: 'Hello World!',
      variant: 'success',
    });
  }
}

export default withSnackBar(App)

Settings

All of settings for SnackBarSupplier is based on material-ui SnackBar API Props Doc. For more information read this link.

1.0.1

5 years ago

1.0.0

5 years ago

0.4.0

6 years ago

0.3.4

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.5

6 years ago

0.1.3

6 years ago