mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-16 22:16:49 +01:00
18 lines
456 B
TypeScript
18 lines
456 B
TypeScript
import classnames from 'classnames';
|
|
import { Link } from 'preact-router';
|
|
import type { ButtonProps } from './Button';
|
|
import { Button } from './Button';
|
|
|
|
type Props = ButtonProps & {
|
|
href: string;
|
|
};
|
|
|
|
export function ButtonLink({ href, className, ...buttonProps }: Props) {
|
|
const linkProps = { href };
|
|
return (
|
|
<Link {...linkProps}>
|
|
<Button className={classnames(className, 'w-full')} tabIndex={-1} {...buttonProps} />
|
|
</Link>
|
|
);
|
|
}
|