24 lines
539 B
Plaintext
24 lines
539 B
Plaintext
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 />;
|