1
1
import React from 'react' ;
2
- import ClassNames from 'classnames ' ;
3
- import style from './style ' ;
2
+ import { themr } from 'react-css-themr ' ;
3
+ import classnames from 'classnames ' ;
4
4
5
- const AppBar = ( props ) => {
6
- const className = ClassNames ( style . root , {
7
- [ style . fixed ] : props . fixed ,
8
- [ style . flat ] : props . flat
5
+ const AppBar = ( { theme , ... props } ) => {
6
+ const className = classnames ( theme . appBar , {
7
+ [ theme . fixed ] : props . fixed ,
8
+ [ theme . flat ] : props . flat
9
9
} , props . className ) ;
10
10
11
11
return (
@@ -19,7 +19,12 @@ AppBar.propTypes = {
19
19
children : React . PropTypes . node ,
20
20
className : React . PropTypes . string ,
21
21
fixed : React . PropTypes . bool ,
22
- flat : React . PropTypes . bool
22
+ flat : React . PropTypes . bool ,
23
+ theme : React . PropTypes . shape ( {
24
+ appBar : React . PropTypes . string . isRequired ,
25
+ fixed : React . PropTypes . string . isRequired ,
26
+ flat : React . PropTypes . string . isRequired
27
+ } )
23
28
} ;
24
29
25
30
AppBar . defaultProps = {
@@ -28,4 +33,4 @@ AppBar.defaultProps = {
28
33
flat : false
29
34
} ;
30
35
31
- export default AppBar ;
36
+ export default themr ( 'ToolboxAppBar' ) ( AppBar ) ;
0 commit comments