Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/three-foxes-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ultraviolet/form": patch
---

pass required prop down to Checkbox
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ exports[`checkboxField > should render correctly with errors 1`] = `
class="uv_9pjq8o5 uv_9pjq8o4"
id="_r_d_"
name="test"
required=""
type="checkbox"
/>
<svg
Expand Down Expand Up @@ -372,6 +373,11 @@ exports[`checkboxField > should render correctly with errors 1`] = `
>
Checkbox field error
</label>
<sup
class="uv_m4c9ow0 uv_m4c9ow4 uv_m4c9ow9 uv_m4c9owj uv_m4c9ow1a uv_m4c9ow2m"
>
*
</sup>
</div>
<span
class="uv_9pjq8o0 uv_m4c9ow0 uv_m4c9ow4 uv_m4c9ow9 uv_m4c9owp uv_m4c9ow1a uv_m4c9ow2m"
Expand Down
1 change: 1 addition & 0 deletions packages/form/src/components/CheckboxField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const CheckboxField = <
return (
<Checkbox
{...props}
required={required}
checked={!!field.value}
disabled={field.disabled}
error={getError({ label: label ?? ariaLabel ?? name }, error)}
Expand Down
Loading