Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (30 sloc) 864 Bytes

SnackBar

See the demo component here

Usage

Below, an example of using the SnackBar component:

import { Button, SnackBar } from 'mdwrapper';

const Demo = () => (
  <>
    <Button onClick={() => this.setState({ display: true })}>
      Show
    </Button>
    <SnackBar 
      open={this.state.display} 
      label={'Close'} 
      onClick={() => this.setState({ display: false })}>
      Demo
    </SnackBar>
  </>
);

Props

List of all properties for the SnackBar component:

Prop Type Default Description
children object - Node Content
label string 'default' Label
leading boolean false Leading Style
onClick function void Click Trigger
open boolean false Open
stacked boolean false Stacked Style
You can’t perform that action at this time.