mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
28 lines
583 B
TypeScript
28 lines
583 B
TypeScript
import { Icon, IconButton } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import upDownArrow from 'icons/arrows/up-down.svg';
|
|
|
|
type Props = {
|
|
handleSort: () => void;
|
|
isSortActive: boolean;
|
|
}
|
|
|
|
const SortButton = ({ handleSort, isSortActive }: Props) => {
|
|
return (
|
|
<IconButton
|
|
icon={ <Icon as={ upDownArrow } boxSize={ 5 }/> }
|
|
aria-label="sort"
|
|
size="sm"
|
|
variant="outline"
|
|
colorScheme="gray-dark"
|
|
ml={ 2 }
|
|
minWidth="36px"
|
|
onClick={ handleSort }
|
|
isActive={ isSortActive }
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default SortButton;
|