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