import { css } from 'ecij'; import type { RenderSortIconProps, RenderSortPriorityProps, RenderSortStatusProps } from './types'; const arrow = css` @layer rdg.SortIcon { fill: currentColor; @media (prefers-reduced-motion: no-preference) { > path { transition: d 0.1s; } } } `; const arrowClassname = `rdg-sort-arrow ${arrow}`; export default function renderSortStatus({ sortDirection, priority }: RenderSortStatusProps) { return ( <> {renderSortIcon({ sortDirection })} {renderSortPriority({ priority })} ); } export function renderSortIcon({ sortDirection }: RenderSortIconProps) { if (sortDirection === undefined) return null; return ( ); } export function renderSortPriority({ priority }: RenderSortPriorityProps) { return priority; }