mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-04-18 22:08:27 +00:00
17 lines
602 B
TypeScript
17 lines
602 B
TypeScript
import dynamic from 'next/dynamic';
|
|
import { Button, Icon, Tooltip } from '@chakra-ui/react';
|
|
|
|
import type { TRequeryButton } from './types';
|
|
|
|
const Repeat = dynamic<MeronexIcon>(() => import('@meronex/icons/fi').then(i => i.FiRepeat));
|
|
|
|
export const RequeryButton = (props: TRequeryButton) => {
|
|
const { requery, bg = 'secondary', ...rest } = props;
|
|
return (
|
|
<Tooltip hasArrow label="Reload Query" placement="top">
|
|
<Button mx={1} as="a" size="sm" zIndex="1" variantColor={bg} onClick={requery} {...rest}>
|
|
<Icon as={Repeat} boxSize="16px" />
|
|
</Button>
|
|
</Tooltip>
|
|
);
|
|
};
|