File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1+ import { splitProps } from "solid-js" ;
12import { A , type RouterLinkProps } from "./i18n-anchor" ;
23
34type ButtonLinkProps = RouterLinkProps & {
45 variant : "primary" | "secondary" ;
56} ;
67
78export const ButtonLink = ( props : ButtonLinkProps ) => {
9+ const [ localProps , otherProps ] = splitProps ( props , [ "variant" ] ) ;
10+
811 return (
912 < A
1013 addLocale
1114 classList = { {
1215 "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" :
13- props . variant === "primary" ,
16+ localProps . variant === "primary" ,
1417 "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" :
15- props . variant === "secondary" ,
18+ localProps . variant === "secondary" ,
1619 } }
17- { ...props }
20+ { ...otherProps }
1821 />
1922 ) ;
2023} ;
You can’t perform that action at this time.
0 commit comments