// @flow
import { type StatelessFunctionalComponent } from 'react';
import styled from 'styled-components';
import type { SpanProps } from './span.proptypes';
import {
  getForegroundColor,
  getSpanFontSize,
  getSpanFontFamily,
  getSpanFontWeight,
} from './span.css-rules';
import {
  getTextAlign,
  getFontStyle,
  getTextDecoration,
  getTextTransform,
} from '../../../mixins/typography';

export const Span: StatelessFunctionalComponent<SpanProps> = styled.span`
  color: ${getForegroundColor};
  text-align: ${getTextAlign};
  font-size: ${getSpanFontSize};
  font-style: ${getFontStyle};
  font-family: ${getSpanFontFamily};
  font-weight: ${getSpanFontWeight};
  text-decoration: ${getTextDecoration};
  text-transform: ${getTextTransform};
`;

Span.displayName = 'Span';
