2015-10-28 03:49:22 +03:00
|
|
|
import React from 'react';
|
2015-11-25 22:30:28 +03:00
|
|
|
import ClassNames from 'classnames';
|
2015-10-28 03:49:22 +03:00
|
|
|
import style from './style';
|
|
|
|
|
|
|
|
const AppBar = (props) => {
|
2015-11-25 22:30:28 +03:00
|
|
|
const className = ClassNames(style.root, {
|
|
|
|
[style.fixed]: props.fixed,
|
|
|
|
[style.flat]: props.flat
|
|
|
|
}, props.className);
|
2015-10-28 03:49:22 +03:00
|
|
|
|
|
|
|
return (
|
2015-10-30 17:38:15 +03:00
|
|
|
<header className={className} data-react-toolbox='app-bar'>
|
2015-10-28 03:49:22 +03:00
|
|
|
{props.children}
|
|
|
|
</header>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
AppBar.propTypes = {
|
2015-11-22 21:20:05 +03:00
|
|
|
children: React.PropTypes.node,
|
2015-10-28 13:23:45 +03:00
|
|
|
className: React.PropTypes.string,
|
|
|
|
fixed: React.PropTypes.bool,
|
|
|
|
flat: React.PropTypes.bool
|
2015-10-28 03:49:22 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
AppBar.defaultProps = {
|
2015-10-28 13:23:45 +03:00
|
|
|
className: '',
|
|
|
|
fixed: false,
|
|
|
|
flat: false
|
2015-10-28 03:49:22 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
export default AppBar;
|