react-toolbox/docs/app/components/layout/main/modules/examples/drawer_example_1.txt

24 lines
539 B
Plaintext
Raw Normal View History

2015-10-31 23:39:51 +03:00
class DrawerTest extends React.Component {
2015-11-05 13:45:23 +03:00
state = {
active: false
};
handleToggle = () => {
this.setState({active: !this.state.active});
2015-10-31 23:39:51 +03:00
};
render () {
return (
<div>
<Button raised accent label='Show Drawer' onClick={this.handleToggle} />
2015-11-05 13:45:23 +03:00
<Drawer active={this.state.active} onOverlayClick={this.handleToggle}>
2015-10-31 23:39:51 +03:00
<h5>This is your Drawer.</h5>
<p>You can embed any content you want, for example a Menu.</p>
</Drawer>
</div>
);
}
}
return <DrawerTest />;