react-toolbox/components/app_bar/AppBar.js

32 lines
627 B
JavaScript
Raw Normal View History

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