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({
194
194
}: MyCheckboxGroupProps ) {
195
195
return (
196
196
<CheckboxGroup { ... props } >
197
- { label }
197
+ { label && < Label > { label } </ Label > }
198
198
{ children }
199
199
{ description && <Text slot = " description" >{ description } </Text >}
200
200
<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=
217
217
By default, ` ColorField ` is uncontrolled. You can set a default value using the ` defaultValue ` prop.
218
218
219
219
``` tsx example
220
- <MyColorField defaultValue = " #7f007f" />
220
+ <MyColorField label = " Color " defaultValue = " #7f007f" />
221
221
```
222
222
223
223
### Controlled
@@ -233,7 +233,7 @@ function Example() {
233
233
let [color, setColor] = React .useState (parseColor (' #7f007f' ));
234
234
return (
235
235
<>
236
- <MyColorField value = { color } onChange = { setColor } />
236
+ <MyColorField label = " Color " value = { color } onChange = { setColor } />
237
237
<p >Current color value: { color .toString (' hex' )} </p >
238
238
</>
239
239
);
Original file line number Diff line number Diff line change @@ -598,7 +598,7 @@ let albums = [
598
598
items = { albums }
599
599
selectionMode = " multiple" >
600
600
{ item => (
601
- <ListBoxItem >
601
+ <ListBoxItem textValue = { item . title } >
602
602
<img src = { item .image } alt = " " />
603
603
<Text slot = " label" >{ item .title } </Text >
604
604
<Text slot = " description" >{ item .artist } </Text >
@@ -687,7 +687,7 @@ The `layout` prop can be set to `"grid"` to enable two-dimensional keyboard navi
687
687
items = { albums }
688
688
selectionMode = " multiple" >
689
689
{ item => (
690
- <ListBoxItem >
690
+ <ListBoxItem textValue = { item . title } >
691
691
<img src = { item .image } alt = " " />
692
692
<Text slot = " label" >{ item .title } </Text >
693
693
<Text slot = " description" >{ item .artist } </Text >
@@ -723,7 +723,7 @@ The `layout="grid"` and `orientation="horizontal"` props can be combined to buil
723
723
items = { albums }
724
724
selectionMode = " multiple" >
725
725
{ item => (
726
- <ListBoxItem >
726
+ <ListBoxItem textValue = { item . title } >
727
727
<img src = { item .image } alt = " " />
728
728
<Text slot = " label" >{ item .title } </Text >
729
729
<Text slot = " description" >{ item .artist } </Text >
You can’t perform that action at this time.
0 commit comments