mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
751b897625
* Added filterability to all dropdown menus * Remove dropdown dividers for empty filtered sections
28 lines
552 B
JavaScript
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;
|