Function
ToggleButton
(
props: PolymorphicProps<T, toggleButtonProps<T>>,
)
Source from the content-addressed store, hash-verified
| 36 | }; |
| 37 | |
| 38 | export 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
Tested by
no test coverage detected