// @flow
import React from 'react';
import type { ComponentType } from 'react';
import { withTheme } from 'styled-components';
import type { ThemeProps } from '../../../../types';
import type { BrandProps } from '../../../../mixins/branding';
import { brandPropTypes } from '../../../../mixins/branding';
import { getChevronColor } from '../css-rules';

const _SmallChevronUp = ({
  colorName = 'greyscale-dark',
  theme,
}: BrandProps & ThemeProps) => (
  <svg width="10px" height="10px" viewBox="0 0 10 10">
    <path
      fill="none"
      fillRule="evenodd"
      stroke={getChevronColor(theme, colorName)}
      strokeLinecap="round"
      strokeWidth="1.5"
      d="M9 7L5 3 1 7"
    />
  </svg>
);

export const SmallChevronUp: ComponentType<{}> = withTheme(_SmallChevronUp);

SmallChevronUp.displayName = 'SmallChevronUp';
SmallChevronUp.propTypes = { ...brandPropTypes };

export { getSmallChevronUpDataUri } from './chevron-down.css-rules';
