(props: ComponentProps<"button"> & IconButtonProps)
| 10 | } |
| 11 | |
| 12 | export function IconButton(props: ComponentProps<"button"> & IconButtonProps) { |
| 13 | const [split, rest] = splitProps(props, ["variant", "size", "iconSize", "class", "classList"]) |
| 14 | return ( |
| 15 | <Kobalte |
| 16 | {...rest} |
| 17 | data-component="icon-button" |
| 18 | data-size={split.size || "normal"} |
| 19 | data-variant={split.variant || "secondary"} |
| 20 | classList={{ |
| 21 | ...(split.classList ?? {}), |
| 22 | [split.class ?? ""]: !!split.class, |
| 23 | }} |
| 24 | > |
| 25 | <Icon name={props.icon} size={split.iconSize ?? (split.size === "large" ? "normal" : "small")} /> |
| 26 | </Kobalte> |
| 27 | ) |
| 28 | } |
nothing calls this directly
no outgoing calls
no test coverage detected