1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00
Files
checktheroads-hyperglass/hyperglass/ui/components/path/button.tsx
2020-12-29 15:58:36 -07:00

20 lines
580 B
TypeScript

import dynamic from 'next/dynamic';
import { Button, Icon, Tooltip } from '@chakra-ui/react';
import type { TPathButton } from './types';
const PathIcon = dynamic<MeronexIcon>(() =>
import('@meronex/icons/bi').then(i => i.BisNetworkChart),
);
export const PathButton = (props: TPathButton) => {
const { onOpen } = props;
return (
<Tooltip hasArrow label="View AS Path" placement="top">
<Button as="a" mx={1} size="sm" variant="ghost" onClick={onOpen} colorScheme="secondary">
<Icon as={PathIcon} boxSize="16px" />
</Button>
</Tooltip>
);
};