// @flow
import React from 'react';
import type { PageTitleProps } from './page-title.proptypes';
import { Head1 } from '../head';

export const PageTitle = ({
  children,
  className,
  spacing = 'pv5',
  grow,
  shrink,
  basis,
  'data-qa': dataQa,
  'data-cy': dataCy,
  id,
}: PageTitleProps) => (
  <Head1
    className={className}
    {...{ spacing, grow, shrink, basis }}
    data-cy={dataCy}
    data-qa={dataQa}
    id={id}
  >
    {children}
  </Head1>
);

PageTitle.displayName = 'PageTitle';
