-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(CheckboxGroup): use checkboxGroupStory
- Loading branch information
1 parent
8046ed1
commit 3d6e248
Showing
4 changed files
with
92 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ReactNode } from "react"; | ||
|
||
import { CheckboxGroup } from "./CheckboxGroup"; | ||
import { UseCheckboxGroupProps, ZodArrayField } from "../../hooks"; | ||
import { PicoFieldErrors } from "../../scenarios/PicoFieldErrors"; | ||
import { FieldLabel } from "../field-label"; | ||
|
||
export const CheckboxGroupField = <Option, Field extends ZodArrayField>({ | ||
field, | ||
label, | ||
getValue, | ||
getLabel, | ||
options, | ||
}: { label: ReactNode } & UseCheckboxGroupProps<Option, Field>) => ( | ||
<> | ||
<FieldLabel field={field} label={label} /> | ||
<p> | ||
<CheckboxGroup | ||
field={field} | ||
getLabel={getLabel} | ||
getValue={getValue} | ||
options={options} | ||
/> | ||
</p> | ||
<PicoFieldErrors field={field} /> | ||
</> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters