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

import type { IconProps } from '@redocly/theme/icons/types';

import { getCssColorVariable } from '@redocly/theme/core/utils';

const Icon = (props: IconProps) => (
  <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
    <path d="M5 3V4H11.295L3 12.295L3.705 13L12 4.705V11H13V3H5Z" />
  </svg>
);

export const ArrowUpRightIcon = styled(Icon).attrs({
  'data-component-name': 'icons/ArrowUpRightIcon/ArrowUpRightIcon',
})`
  path {
    fill: ${({ color }) => getCssColorVariable(color)};
  }

  height: ${({ size }) => size || '16px'};
  width: ${({ size }) => size || '16px'};
`;
