import React from 'react'; import { classNames } from '../../../utils'; import { Icon } from '../../Icon'; import type { SortState, TableColumn } from '../types'; import styles from '../Table.module.css'; type Props = { column: TableColumn; sortState: SortState; }; export function SortIcon({ column, sortState }: Props) { if (column.id === sortState.columnId && sortState.direction === 'ascending') { return ( ); } if ( column.id === sortState.columnId && sortState.direction === 'descending' ) { return ( ); } return ( <> ); }