2015-09-21 11:01:52 +03:00
|
|
|
/* global React */
|
|
|
|
|
|
|
|
import Button from '../../components/button';
|
|
|
|
import Drawer from '../../components/drawer';
|
|
|
|
|
|
|
|
export default React.createClass({
|
|
|
|
displayName: 'DrawerTest',
|
|
|
|
|
|
|
|
onClick (ref, method) {
|
|
|
|
this.refs[ref][method]();
|
|
|
|
},
|
|
|
|
|
|
|
|
render () {
|
|
|
|
return (
|
|
|
|
<section>
|
|
|
|
<h2>Drawer</h2>
|
2015-10-02 23:08:02 +03:00
|
|
|
<p style={{marginBottom: '10px'}}>You can navigate using a drawer to the left or right. They can be auto-closable or not.</p>
|
|
|
|
|
2015-09-21 11:01:52 +03:00
|
|
|
<Drawer ref='left' hideable={true}>
|
|
|
|
<h2>Officia deserunt mollit.</h2>
|
|
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
|
|
</Drawer>
|
|
|
|
|
|
|
|
<Drawer ref='right' type='right'>
|
|
|
|
<Button label='Close' onClick={this.onClick.bind(null, 'right', 'hide')} />
|
|
|
|
</Drawer>
|
|
|
|
|
|
|
|
<nav>
|
2015-10-02 23:20:39 +03:00
|
|
|
<Button className='accent' label='Drawer left hideable' type='raised' onClick={this.onClick.bind(null, 'left', 'show')} />
|
|
|
|
<Button className='primary' style={{marginLeft: '20px'}} label='Drawer right' type='raised' onClick={this.onClick.bind(null, 'right', 'show')} />
|
2015-09-21 11:01:52 +03:00
|
|
|
</nav>
|
|
|
|
</section>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|