summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/components/checkbox.tsx
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-12-19 15:11:42 -0600
committerAdam <[email protected]>2025-12-20 04:25:17 -0600
commit26cf5e003ebd402b3343504dd6726a4c8cc9ffe3 (patch)
tree39553711b6f21da32918272181416515575ad987 /packages/ui/src/components/checkbox.tsx
parent742cf10deeffb31292cdbf8a5ca7afb07698d9dc (diff)
downloadopencode-26cf5e003ebd402b3343504dd6726a4c8cc9ffe3.tar.gz
opencode-26cf5e003ebd402b3343504dd6726a4c8cc9ffe3.zip
fix(desktop): perf stuff
Diffstat (limited to 'packages/ui/src/components/checkbox.tsx')
-rw-r--r--packages/ui/src/components/checkbox.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/ui/src/components/checkbox.tsx b/packages/ui/src/components/checkbox.tsx
index b98639758..7187e4ac3 100644
--- a/packages/ui/src/components/checkbox.tsx
+++ b/packages/ui/src/components/checkbox.tsx
@@ -1,5 +1,5 @@
import { Checkbox as Kobalte } from "@kobalte/core/checkbox"
-import { children, Show, splitProps } from "solid-js"
+import { Show, splitProps } from "solid-js"
import type { ComponentProps, JSX, ParentProps } from "solid-js"
export interface CheckboxProps extends ParentProps<ComponentProps<typeof Kobalte>> {
@@ -10,7 +10,6 @@ export interface CheckboxProps extends ParentProps<ComponentProps<typeof Kobalte
export function Checkbox(props: CheckboxProps) {
const [local, others] = splitProps(props, ["children", "class", "label", "hideLabel", "description", "icon"])
- const resolved = children(() => local.children)
return (
<Kobalte {...others} data-component="checkbox">
<Kobalte.Input data-slot="checkbox-checkbox-input" />
@@ -29,9 +28,9 @@ export function Checkbox(props: CheckboxProps) {
</Kobalte.Indicator>
</Kobalte.Control>
<div data-slot="checkbox-checkbox-content">
- <Show when={resolved()}>
+ <Show when={props.children}>
<Kobalte.Label data-slot="checkbox-checkbox-label" classList={{ "sr-only": local.hideLabel }}>
- {resolved()}
+ {props.children}
</Kobalte.Label>
</Show>
<Show when={local.description}>