UNPKG

@ftrack/react-toolbox

Version:

A set of React components implementing Google's Material Design specification with the power of CSS Modules.

24 lines (20 loc) 539 B
class DrawerTest extends React.Component { state = { active: false }; handleToggle = () => { this.setState({active: !this.state.active}); }; render () { return ( <div> <Button raised accent label='Show Drawer' onClick={this.handleToggle} /> <Drawer active={this.state.active} onOverlayClick={this.handleToggle}> <h5>This is your Drawer.</h5> <p>You can embed any content you want, for example a Menu.</p> </Drawer> </div> ); } } return <DrawerTest />;