Updated types.

This commit is contained in:
Mike Cao committed 2023-11-13 14:12:05 -08:00
1 parent bdf2fa4f05
commit 366ef35d3d
14 files changed
+136 -59

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
import classNames from 'classnames';
import Link from 'next/link';
import { useLocale } from 'components/hooks';
import styles from './LinkButton.module.css';
import { ReactNode } from 'react';
export interface LinkButtonProps {
href: string;
className: string;
variant?: string;
scroll?: boolean;
children?: ReactNode;
}
export function LinkButton({ href, className, variant, scroll = true, children }: LinkButtonProps) {
const { dir } = useLocale();
return (
<Link
className={classNames(styles.button, className, { [styles[variant]]: true })}
href={href}
dir={dir}
scroll={scroll}
>
{children}
</Link>
);
}
export default LinkButton;