Refactored forms and pages.

This commit is contained in:
Mike Cao 2023-10-07 18:55:14 -07:00
parent 1325abe31d
commit 6253d55790
57 changed files with 209 additions and 208 deletions

View file

@ -1,16 +1,14 @@
import classNames from 'classnames';
import Link from 'next/link';
import { Icon, Icons, Text } from 'react-basics';
import styles from './LinkButton.module.css';
import { useLocale } from 'components/hooks';
import styles from './LinkButton.module.css';
export function LinkButton({ href, icon, className, children }) {
export function LinkButton({ href, className, children }) {
const { dir } = useLocale();
return (
<Link className={classNames(styles.button, className)} href={href}>
<Icon rotate={dir === 'rtl' ? 0 : 180}>{icon || <Icons.ArrowRight />}</Icon>
<Text>{children}</Text>
<Link className={classNames(styles.button, className)} href={href} dir={dir}>
{children}
</Link>
);
}