MCPcopy Create free account
hub / github.com/arctic-cli/interface / IconButton

Function IconButton

packages/ui/src/components/icon-button.tsx:12–28  ·  view source on GitHub ↗
(props: ComponentProps<"button"> & IconButtonProps)

Source from the content-addressed store, hash-verified

10}
11
12export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected