import React, { Component } from 'react';
import PropTypes from 'prop-types';

class Header extends Component {
  render() {
    const { title, extra } = this.props;

    return (
      <div className="rule-header">
        {title && <div className="rule-header-title">{title}</div>}
        <div className="rule-header-extra">{extra}</div>
      </div>
    );
  }
}

Header.propTypes = {
  title: PropTypes.node,
  extra: PropTypes.array
};

export default Header;
