Closed mkernohanbc closed 2 weeks ago
I've made changes to the Checkbox and CheckboxGroup to bring in our latest changes, update the styles to match our most up to date design, and add tests. With these changes, I think we're ready to merge. Will mark this as approved and leave it up to you to confirm, @mkernohanbc.
flexWrap
prop added to CheckboxGroup to allow wrapping horizontal options rather than overflowing caf74a5, eb24ea6children
removed from interface in CheckboxGroup in favor of the RAC default (no difference in use) 4976771isIndeterminate
+ isDisabled
dd65760isIndeterminate
+ isInvalid
01f9f22isInvalid
and isSelected
props to Checkbox template b4d9797main
afce1ceisIndeterminate
+ isDisabled
:
isIndeterminate
+ isInvalid
:
flexWrap
defaulted to nowrap
:
flexWrap
set to wrap
:
Thanks for all your work to clean this up @ty2k — looks good to me! Will squash and merge now.
This PR adds two new components, and their supporting documentation:
Checkbox
CheckboxGroup
They are based on RAC Checkbox and CheckboxGroup.
Checkbox
renders a focusable/selectable<div>
and a hidden<input>
. The text label is set via thechildren
slot:Checkbox
supports the following states:Note:
Checkbox
can be used independently of aCheckboxGroup
, but using it as a standalone component requires additional work to add validation and error handling thatCheckboxGroup
has built-in.CheckboxGroup
provides a semantic wrapper for one or more checkboxes:It includes these slots:
children
(expects an array of Checkbox components)label
description
errorMessage
(via FieldError)Additionally, the
orientation
prop can be used to toggle the layout of a group betweenvertical
(default) andhorizontal
.