Function
ToggleGroup
({
className,
variant,
size,
children,
...props
}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
VariantProps<typeof toggleVariants>)
Source from the content-addressed store, hash-verified
| 13 | }) |
| 14 | |
| 15 | function 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 | |
| 41 | function ToggleGroupItem({ |
| 42 | className, |
Callers
nothing calls this directly
Tested by
no test coverage detected