MCPcopy Create free account
hub / github.com/better-auth/examples / Button

Function Button

astro-example/src/components/ui/button.tsx:45–66  ·  view source on GitHub ↗
(
	props: PolymorphicProps<T, buttonProps<T>>,
)

Source from the content-addressed store, hash-verified

43 };
44
45export const Button = <T extends ValidComponent = "button">(
46 props: PolymorphicProps<T, buttonProps<T>>,
47) => {
48 const [local, rest] = splitProps(props as buttonProps, [
49 "class",
50 "variant",
51 "size",
52 ]);
53
54 return (
55 <ButtonPrimitive
56 class={cn(
57 buttonVariants({
58 size: local.size,
59 variant: local.variant,
60 }),
61 local.class,
62 )}
63 {...rest}
64 />
65 );
66};

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected