File tree Expand file tree Collapse file tree 4 files changed +42
-0
lines changed
templates/Drawer/StandardDrawer Expand file tree Collapse file tree 4 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -8,5 +8,6 @@ export { default as BasicAppBar } from './templates/AppBar/BasicAppBar';
8
8
export { default as TwoRowsAppBar } from './templates/AppBar/TwoRowsAppBar' ;
9
9
export { default as BasicFooter } from './templates/Footer/BasicFooter' ;
10
10
export { default as BasicDrawer } from './templates/Drawer/BasicDrawer' ;
11
+ export { default as StandardDrawer } from './templates/Drawer/StandardDrawer' ;
11
12
12
13
export default Layout ;
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import PropTypes from 'prop-types' ;
3
+ import { withStyles } from 'material-ui/styles' ;
4
+ import Divider from 'material-ui/Divider' ;
5
+
6
+ import DrawerItemsList from '../DrawerItemsList' ;
7
+
8
+ import styles from './styles' ;
9
+
10
+ class StandardDrawer extends React . PureComponent {
11
+ static propTypes = {
12
+ secondList : PropTypes . arrayOf ( PropTypes . shape ( { } ) ) ,
13
+ firstList : PropTypes . arrayOf ( PropTypes . shape ( { } ) ) ,
14
+ classes : PropTypes . shape ( { } ) ,
15
+ } ;
16
+
17
+ static defaultProps = {
18
+ firstList : null ,
19
+ secondList : null ,
20
+ } ;
21
+ render ( ) {
22
+ const { firstList, secondList, classes } = this . props ;
23
+ return (
24
+ < div className = { classes . wrapper } >
25
+ { firstList ? < DrawerItemsList items = { firstList } /> : null }
26
+ { firstList && secondList ? < Divider /> : null }
27
+ { secondList ? < DrawerItemsList items = { secondList } /> : null }
28
+ </ div >
29
+ ) ;
30
+ }
31
+ }
32
+
33
+ export default withStyles ( styles ) ( StandardDrawer ) ;
Original file line number Diff line number Diff line change
1
+ import StandardDrawer from './StandardDrawer' ;
2
+
3
+ export default StandardDrawer ;
Original file line number Diff line number Diff line change
1
+ export default {
2
+ wrapper : {
3
+ width : '100%' ,
4
+ } ,
5
+ } ;
You can’t perform that action at this time.
0 commit comments