MCPcopy Create free account
hub / github.com/evolify/dumpfun / ToggleGroup

Function ToggleGroup

common/components/ui/toggle-group.tsx:15–39  ·  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

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

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected