insomnia/app/ui/components/base/dropdown/dropdown-divider.js
Gregory Schier 751b897625 Added filterability to all dropdown menus (#340)
* Added filterability to all dropdown menus

* Remove dropdown dividers for empty filtered sections
2017-06-29 19:22:51 -07:00

28 lines
552 B
JavaScript

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