1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-04-19 14:28:28 +00:00
thatmattlove-hyperglass/hyperglass/ui/components/footer/link.tsx
2021-12-19 23:30:09 -07:00

16 lines
532 B
TypeScript

import { Button, Link } from '@chakra-ui/react';
import { useBreakpointValue } from '~/hooks';
import type { ButtonProps, LinkProps } from '@chakra-ui/react';
type FooterLinkProps = ButtonProps & LinkProps & { title: string };
export const FooterLink = (props: FooterLinkProps): JSX.Element => {
const { title } = props;
const btnSize = useBreakpointValue({ base: 'xs', lg: 'sm' });
return (
<Button as={Link} isExternal size={btnSize} variant="ghost" aria-label={title} {...props}>
{title}
</Button>
);
};