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

Function ToggleButton

astro-example/src/components/ui/toggle.tsx:38–56  ·  view source on GitHub ↗
(
	props: PolymorphicProps<T, toggleButtonProps<T>>,
)

Source from the content-addressed store, hash-verified

36 };
37
38export const ToggleButton = <T extends ValidComponent = "button">(
39 props: PolymorphicProps<T, toggleButtonProps<T>>,
40) => {
41 const [local, rest] = splitProps(props as toggleButtonProps, [
42 "class",
43 "variant",
44 "size",
45 ]);
46
47 return (
48 <ToggleButtonPrimitive
49 class={cn(
50 toggleVariants({ variant: local.variant, size: local.size }),
51 local.class,
52 )}
53 {...rest}
54 />
55 );
56};

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected