lookingglass/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>
);
};