'use client'; import type { ComponentProps, CSSProperties, FC } from 'react'; import { useReactCompareSliderContext } from './provider'; import { ReactCompareSliderCssVars } from '../consts'; type ThisArrowProps = { /** Whether to flip the arrow direction. */ flip?: boolean; }; const ThisArrow: FC = ({ flip }) => { const style: CSSProperties = { width: '0.85rem', height: '0.85rem', clipPath: 'polygon(100% 0%, 100% 100%, 30% 50%)', rotate: flip ? '180deg' : '0deg', // We use `outline` instead of `border` to ensure that all line colours match in high contrast mode. outline: `0.5rem solid var(${ReactCompareSliderCssVars.handleColor})`, outlineOffset: '-0.5rem', }; return