mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-25 01:54:49 +00:00
feat: add desktop/web app package (#2606)
Co-authored-by: adamdotdevin <2363879+adamdottv@users.noreply.github.com> Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
15
packages/app/src/ui/link.tsx
Normal file
15
packages/app/src/ui/link.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { A } from "@solidjs/router"
|
||||
import { splitProps } from "solid-js"
|
||||
import type { ComponentProps } from "solid-js"
|
||||
import { getButtonClasses } from "./button"
|
||||
|
||||
export interface LinkProps extends ComponentProps<typeof A> {
|
||||
variant?: "primary" | "secondary" | "outline" | "ghost"
|
||||
size?: "sm" | "md" | "lg"
|
||||
}
|
||||
|
||||
export function Link(props: LinkProps) {
|
||||
const [local, others] = splitProps(props, ["variant", "size", "class"])
|
||||
const classes = local.variant ? getButtonClasses(local.variant, local.size, local.class) : local.class
|
||||
return <A class={classes} {...others} />
|
||||
}
|
||||
Reference in New Issue
Block a user