'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

class Divider extends _react2.default.Component {
  constructor(...args) {
    var _temp;

    return _temp = super(...args), this.onClick = e => {
      if (this.props.onClick) this.props.onClick(e);
    }, _temp;
  }

  render() {
    return _react2.default.createElement(
      'div',
      { className: 'divider', style: { cursor: 'default' }, onClick: this.onClick },
      _react2.default.createElement(
        'h5',
        null,
        this.props.text
      ),
      _react2.default.createElement('hr', null)
    );
  }
}
exports.default = Divider;
Divider.propTypes = {
  text: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]),
  onClick: _propTypes2.default.func
};
module.exports = exports['default'];