cschroeter / park-ui

Beautifully designed components built with Ark UI and Panda CSS that work with a variety of JS frameworks.
https://park-ui.com
MIT License
1.75k stars 75 forks source link

[fix][solid][checkbox]: added missing hidden input as per Ark officia… #362

Closed nathanschwarz closed 4 months ago

nathanschwarz commented 4 months ago

The current implementation of the checkbox is the following :

<ArkCheckbox.Root class={root()} {...rootProps}>
      <ArkCheckbox.Control class={control()}>
        <ArkCheckbox.Indicator class={indicator()}>
          <CheckIcon />
        </ArkCheckbox.Indicator>
        <ArkCheckbox.Indicator indeterminate class={indicator()}>
          <MinusIcon />
        </ArkCheckbox.Indicator>
      </ArkCheckbox.Control>
      <Show when={getChildren()}>
        <ArkCheckbox.Label class={label()}>{getChildren()}</ArkCheckbox.Label>
      </Show>
    </ArkCheckbox.Root>

which is unusable (the checkbox won't check or uncheck). I figure it was missing the <ArkCheckbox.HiddenInput /> from the ark documentation.

<ArkCheckbox.Root class={root()} {...rootProps}>
      <ArkCheckbox.Control class={control()}>
        <ArkCheckbox.Indicator class={indicator()}>
          <CheckIcon />
        </ArkCheckbox.Indicator>
        <ArkCheckbox.Indicator indeterminate class={indicator()}>
          <MinusIcon />
        </ArkCheckbox.Indicator>
      </ArkCheckbox.Control>
      <Show when={getChildren()}>
        <ArkCheckbox.Label class={label()}>{getChildren()}</ArkCheckbox.Label>
      </Show>
       <ArkCheckbox.HiddenInput />
    </ArkCheckbox.Root>
vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
park-ui-docs ❌ Failed (Inspect) Jul 4, 2024 9:22pm
cschroeter commented 4 months ago

@nathanschwarz

Thanks for your contribution I've updated this directly in the new website https://park-ui.com/solid/docs/components/checkbox