Spaces:
Configuration error
Configuration error
Download src/components/common/LinkButton.tsx from SreejithSHR/umami: direct link, hf CLI and curl.
- Browser
- Download file 699 Bytes
-
https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/src/components/common/LinkButton.tsx
- Command line
-
hf download hf://spaces/SreejithSHR/umami/src/components/common/LinkButton.tsx
-
curl -L -o LinkButton.tsx https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/src/components/common/LinkButton.tsx
699 Bytes
| 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; | |