insomnia/app/ui/components/base/dropdown/dropdown-divider.js

28 lines
550 B
JavaScript
Raw Normal View History

import React, {PropTypes, PureComponent} from 'react';
import classnames from 'classnames';
2016-04-23 06:53:22 +00:00
class DropdownDivider extends PureComponent {
render () {
const {children} = this.props;
const classes = classnames(
'dropdown__divider',
{'dropdown__divider--no-name': !children}
);
return (
<li className={classes}>
<span className="dropdown__divider__label">
{children}
</span>
</li>
);
}
}
2016-04-23 06:53:22 +00:00
DropdownDivider.propTypes = {
children: PropTypes.node
};
2016-04-23 06:53:22 +00:00
export default DropdownDivider;