MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / ToggleGroup

Function ToggleGroup

src/components/ui/toggle-group.tsx:17–41  ·  view source on GitHub ↗
({
  className,
  variant,
  size,
  children,
  ...props
}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
  VariantProps<typeof toggleVariants>)

Source from the content-addressed store, hash-verified

15})
16
17function ToggleGroup({
18 className,
19 variant,
20 size,
21 children,
22 ...props
23}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
24 VariantProps<typeof toggleVariants>) {
25 return (
26 <ToggleGroupPrimitive.Root
27 data-slot="toggle-group"
28 data-variant={variant}
29 data-size={size}
30 className={cn(
31 "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
32 className
33 )}
34 {...props}
35 >
36 <ToggleGroupContext.Provider value={{ variant, size }}>
37 {children}
38 </ToggleGroupContext.Provider>
39 </ToggleGroupPrimitive.Root>
40 )
41}
42
43function ToggleGroupItem({
44 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected