// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import React from 'react'; import styled from 'styled-components'; import { Direction } from '../../../../types'; import Svg, { SvgProps } from '../Svg'; const dirTransform = { up: '0', right: '90', down: '180', left: '270', }; interface ArrowProps extends SvgProps { /** Defines the direction of the arrow. */ direction?: Direction; } const StyledArrow = styled(Svg)` transform: ${({ direction }) => `rotate(${dirTransform[direction || 'up']}deg)`}; `; export const Arrow: React.FC> = ({ direction = 'up', ...rest }) => ( ); Arrow.displayName = 'Arrow'; export default Arrow;