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

Function Button

packages/ui/src/components/button.tsx:13–33  ·  view source on GitHub ↗
(props: ButtonProps)

Source from the content-addressed store, hash-verified

11}
12
13export function Button(props: ButtonProps) {
14 const [split, rest] = splitProps(props, ["variant", "size", "icon", "class", "classList"])
15 return (
16 <Kobalte
17 {...rest}
18 data-component="button"
19 data-size={split.size || "normal"}
20 data-variant={split.variant || "secondary"}
21 data-icon={split.icon}
22 classList={{
23 ...(split.classList ?? {}),
24 [split.class ?? ""]: !!split.class,
25 }}
26 >
27 <Show when={split.icon}>
28 <Icon name={split.icon!} size="small" />
29 </Show>
30 {props.children}
31 </Kobalte>
32 )
33}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected