// @flow
import React, { useContext } from 'react';
import { ThemeContext } from 'styled-components';
import { getChevronColor } from '../css-rules';
import type { ChevronRightProps } from './chevron-right.proptypes';

export const ChevronRight = ({
  colorName = 'greyscale-darker',
}: ChevronRightProps) => {
  const theme = useContext(ThemeContext);
  return (
    <svg width="44" height="44" viewBox="0 0 44 44">
      <path
        fill="none"
        fillRule="evenodd"
        stroke={getChevronColor(theme, colorName)}
        strokeLinecap="round"
        strokeWidth="2"
        d="M22 16l6 6-6 6"
      />
    </svg>
  );
};

ChevronRight.displayName = 'ChevronRight';

export { getChevronRightDataUri } from './chevron-right.css-rules';
