2023-10-03 18:45:02 +02:00
|
|
|
import classNames from 'classnames';
|
2023-07-30 09:11:26 +02:00
|
|
|
import Link from 'next/link';
|
2023-10-03 18:45:02 +02:00
|
|
|
import { useLocale } from 'components/hooks';
|
2023-10-08 03:55:14 +02:00
|
|
|
import styles from './LinkButton.module.css';
|
2023-10-03 18:45:02 +02:00
|
|
|
|
2023-10-15 22:12:29 +02:00
|
|
|
export function LinkButton({ href, className, variant, children }) {
|
2023-10-03 18:45:02 +02:00
|
|
|
const { dir } = useLocale();
|
2023-07-30 09:11:26 +02:00
|
|
|
|
|
|
|
return (
|
2023-10-15 22:12:29 +02:00
|
|
|
<Link
|
|
|
|
className={classNames(styles.button, className, { [styles[variant]]: true })}
|
|
|
|
href={href}
|
|
|
|
dir={dir}
|
|
|
|
>
|
2023-10-08 03:55:14 +02:00
|
|
|
{children}
|
2023-07-30 09:11:26 +02:00
|
|
|
</Link>
|
|
|
|
);
|
|
|
|
}
|
2023-08-21 11:06:09 +02:00
|
|
|
|
|
|
|
export default LinkButton;
|