forked from solidjs/solid-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbutton-link.tsx
More file actions
20 lines (18 loc) · 788 Bytes
/
button-link.tsx
File metadata and controls
20 lines (18 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { A, type RouterLinkProps } from "./i18n-anchor";
type ButtonLinkProps = RouterLinkProps & {
variant: "primary" | "secondary";
};
export const ButtonLink = (props: ButtonLinkProps) => {
return (
<A
addLocale
classList={{
"rounded-full bg-blue-300 py-2 px-4 text-sm font-semibold text-slate-900 hover:bg-blue-200 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-300/50 active:bg-blue-500":
props.variant === "primary",
"rounded-full bg-slate-800 py-2 px-4 text-sm font-semibold text-white hover:bg-slate-700 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white/50 active:text-slate-300":
props.variant === "secondary",
}}
{...props}
/>
);
};