mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
27 lines
548 B
TypeScript
27 lines
548 B
TypeScript
import React from 'react';
|
|
|
|
import { IconButton } from '@luxfi/ui/icon-button';
|
|
import IconSvg from 'ui/shared/IconSvg';
|
|
|
|
interface Props {
|
|
value: boolean;
|
|
onClick: () => void;
|
|
loading?: boolean;
|
|
}
|
|
|
|
const TableViewToggleButton = ({ value, onClick, loading }: Props) => {
|
|
return (
|
|
<IconButton
|
|
size="md"
|
|
variant="dropdown"
|
|
onClick={ onClick }
|
|
selected={ !value }
|
|
loadingSkeleton={ loading }
|
|
>
|
|
<IconSvg name="list_view"/>
|
|
</IconButton>
|
|
);
|
|
};
|
|
|
|
export default React.memo(TableViewToggleButton);
|