MCPcopy Index your code
hub / github.com/OpenPipe/OpenPipe / SortArrows

Function SortArrows

app/src/components/sorting.tsx:47–68  ·  view source on GitHub ↗
(props: { field: Fields })

Source from the content-addressed store, hash-verified

45};
46
47export const SortArrows = <Fields extends SortableFields>(props: { field: Fields }) => {
48 const { toggle, params } = useSortOrder<Fields>();
49
50 const currentSort = params?.field === props.field ? params.order : undefined;
51
52 return (
53 <VStack spacing={0} h={6} cursor="pointer" onClick={() => toggle(props.field)} justify="center">
54 <Icon
55 as={BiSolidUpArrow}
56 color={currentSort === "asc" ? "orange.400" : "gray.300"}
57 boxSize={2}
58 strokeWidth={2}
59 />
60 <Icon
61 as={BiSolidDownArrow}
62 color={currentSort === "desc" ? "orange.400" : "gray.300"}
63 boxSize={2}
64 strokeWidth={2}
65 />
66 </VStack>
67 );
68};
69
70export const SortableHeader = <T extends string>(props: {
71 title: string;

Callers

nothing calls this directly

Calls 1

useSortOrderFunction · 0.85

Tested by

no test coverage detected