2017-03-08 05:52:17 +00:00
|
|
|
import React, {PropTypes, PureComponent} from 'react';
|
2016-08-15 17:04:36 +00:00
|
|
|
import classnames from 'classnames';
|
2016-04-23 06:53:22 +00:00
|
|
|
|
2017-02-28 21:32:23 +00:00
|
|
|
class DropdownDivider extends PureComponent {
|
|
|
|
render () {
|
|
|
|
const {children} = this.props;
|
2016-08-15 17:04:36 +00:00
|
|
|
|
2017-02-28 21:32:23 +00:00
|
|
|
const classes = classnames(
|
|
|
|
'dropdown__divider',
|
|
|
|
{'dropdown__divider--no-name': !children}
|
|
|
|
);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<li className={classes}>
|
2016-08-15 17:04:36 +00:00
|
|
|
<span className="dropdown__divider__label">
|
2016-12-21 23:37:48 +00:00
|
|
|
{children}
|
2016-08-15 17:04:36 +00:00
|
|
|
</span>
|
2017-02-28 21:32:23 +00:00
|
|
|
</li>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2016-04-23 06:53:22 +00:00
|
|
|
|
2017-03-08 05:52:17 +00:00
|
|
|
DropdownDivider.propTypes = {
|
|
|
|
children: PropTypes.node
|
|
|
|
};
|
2016-04-23 06:53:22 +00:00
|
|
|
|
|
|
|
export default DropdownDivider;
|