1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00
portainer/app/react/components/datatables/TableHeaderSortIcons.tsx
Ali d78b762f7b
refactor(icons): replace fa icons [EE-4459] (#7907)
refactor(icons): remove fontawesome EE-4459

refactor(icon) replace feather with lucide EE-4472
2022-11-28 15:00:28 +13:00

34 lines
886 B
TypeScript

import clsx from 'clsx';
import SortDownIcon from './sort-arrow-down.svg?c';
import SortUpIcon from './sort-arrow-up.svg?c';
import styles from './TableHeaderSortIcons.module.css';
interface Props {
sorted: boolean;
descending: boolean;
className?: string;
}
export function TableHeaderSortIcons({ sorted, descending, className }: Props) {
return (
<div className="flex flex-row no-wrap w-min-max align-middle">
<SortDownIcon
className={clsx(
className,
sorted && !descending && styles.activeSortIcon,
styles.sortIcon
)}
aria-hidden="true"
/>
<SortUpIcon
className={clsx(
'-ml-1', // shift closer to SortDownIcon to match the mockup
sorted && descending && styles.activeSortIcon,
styles.sortIcon
)}
aria-hidden="true"
/>
</div>
);
}