Function
Button
(
props: PolymorphicProps<T, buttonProps<T>>,
)
Source from the content-addressed store, hash-verified
| 43 | }; |
| 44 | |
| 45 | export const Button = <T extends ValidComponent = "button">( |
| 46 | props: PolymorphicProps<T, buttonProps<T>>, |
| 47 | ) => { |
| 48 | const [local, rest] = splitProps(props as buttonProps, [ |
| 49 | "class", |
| 50 | "variant", |
| 51 | "size", |
| 52 | ]); |
| 53 | |
| 54 | return ( |
| 55 | <ButtonPrimitive |
| 56 | class={cn( |
| 57 | buttonVariants({ |
| 58 | size: local.size, |
| 59 | variant: local.variant, |
| 60 | }), |
| 61 | local.class, |
| 62 | )} |
| 63 | {...rest} |
| 64 | /> |
| 65 | ); |
| 66 | }; |
Callers
nothing calls this directly
Tested by
no test coverage detected