@opencode-ai/ui 0.0.0-dev-17844 → 0.0.0-dev-17852

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode-ai/ui",
3
- "version": "0.0.0-dev-17844",
3
+ "version": "0.0.0-dev-17852",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,5 +1,5 @@
1
1
  import { Root } from "@kobalte/core/button"
2
- import { type ComponentProps, Show, createMemo, splitProps } from "solid-js"
2
+ import { type ComponentProps, Show, splitProps } from "solid-js"
3
3
  import { Icon, type IconProps } from "@opencode-ai/ui/icon"
4
4
  import "./button.css"
5
5
 
@@ -13,22 +13,19 @@ export interface ButtonProps
13
13
 
14
14
  export function Button(props: ButtonProps) {
15
15
  const [split, rest] = splitProps(props, ["variant", "size", "icon", "class", "classList"])
16
- const resolvedIcon = createMemo(() => split.icon)
17
16
  return (
18
17
  <Root
19
18
  {...rest}
20
19
  data-component="button-v2"
21
20
  data-size={split.size || "normal"}
22
21
  data-variant={split.variant || "neutral"}
23
- data-icon={resolvedIcon()}
22
+ data-icon={split.icon}
24
23
  classList={{
25
24
  ...split.classList,
26
25
  [split.class ?? ""]: !!split.class,
27
26
  }}
28
27
  >
29
- <Show when={resolvedIcon()}>
30
- <Icon name={resolvedIcon()!} />
31
- </Show>
28
+ <Show when={split.icon}>{(icon) => <Icon name={icon()} />}</Show>
32
29
  {props.children}
33
30
  </Root>
34
31
  )