import React from 'react';
import styled from 'styled-components';

interface StyleProps {
  size: number;
  color: string;
}

interface Props {
  color?: string;
  size?: number;
  title: string;
}

const H2 = ({ color = '#000', size = 21, title }: Props) => {
  return (
    <H2Style color={color} size={size}>
      {title}
    </H2Style>
  );
};

export default H2;

/* styles */
const H2Style = styled.h2<StyleProps>`
  font-size: ${({ size }) => `${size}px`};
  color: ${({ color }) => color};
`;
