import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Title from '../../Title';

import './card-title.scss';

const SectionTitle = ({ className, section, size, ...props }) => (
  <Title
    className={className}
    styleName={classNames(
      size,
      'title',
      { 'title--section': section }
    )}
    {...props}
  />
);

SectionTitle.componentName = 'CardTitle';

SectionTitle.propTypes = {
  /** @ignore */
  className: PropTypes.string,
  level: PropTypes.number,
  section: PropTypes.bool,
  size: PropTypes.string
};

SectionTitle.defaultProps = {
  className: undefined,
  level: 4,
  section: false,
  size: null
};

export default SectionTitle;
