File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
packages/react-aria-components/docs Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ function MyCheckboxGroup({
194194}: MyCheckboxGroupProps ) {
195195 return (
196196 <CheckboxGroup { ... props } >
197- { label }
197+ { label && < Label > { label } </ Label > }
198198 { children }
199199 { description && <Text slot = " description" >{ description } </Text >}
200200 <FieldError >{ errorMessage } </FieldError >
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ A ColorField accepts either a color string or <TypeLink links={docs.links} type=
217217By default, ` ColorField ` is uncontrolled. You can set a default value using the ` defaultValue ` prop.
218218
219219``` tsx example
220- <MyColorField defaultValue = " #7f007f" />
220+ <MyColorField label = " Color " defaultValue = " #7f007f" />
221221```
222222
223223### Controlled
@@ -233,7 +233,7 @@ function Example() {
233233 let [color, setColor] = React .useState (parseColor (' #7f007f' ));
234234 return (
235235 <>
236- <MyColorField value = { color } onChange = { setColor } />
236+ <MyColorField label = " Color " value = { color } onChange = { setColor } />
237237 <p >Current color value: { color .toString (' hex' )} </p >
238238 </>
239239 );
Original file line number Diff line number Diff line change @@ -598,7 +598,7 @@ let albums = [
598598 items = { albums }
599599 selectionMode = " multiple" >
600600 { item => (
601- <ListBoxItem >
601+ <ListBoxItem textValue = { item . title } >
602602 <img src = { item .image } alt = " " />
603603 <Text slot = " label" >{ item .title } </Text >
604604 <Text slot = " description" >{ item .artist } </Text >
@@ -687,7 +687,7 @@ The `layout` prop can be set to `"grid"` to enable two-dimensional keyboard navi
687687 items = { albums }
688688 selectionMode = " multiple" >
689689 { item => (
690- <ListBoxItem >
690+ <ListBoxItem textValue = { item . title } >
691691 <img src = { item .image } alt = " " />
692692 <Text slot = " label" >{ item .title } </Text >
693693 <Text slot = " description" >{ item .artist } </Text >
@@ -723,7 +723,7 @@ The `layout="grid"` and `orientation="horizontal"` props can be combined to buil
723723 items = { albums }
724724 selectionMode = " multiple" >
725725 { item => (
726- <ListBoxItem >
726+ <ListBoxItem textValue = { item . title } >
727727 <img src = { item .image } alt = " " />
728728 <Text slot = " label" >{ item .title } </Text >
729729 <Text slot = " description" >{ item .artist } </Text >
You can’t perform that action at this time.
0 commit comments