Skip to content

Commit b4e1f1c

Browse files
authored
RAC: docs improvements for render props (#4794)
* improve render props * remove showOptional
1 parent 33779db commit b4e1f1c

18 files changed

+25
-24
lines changed

packages/react-aria-components/docs/Checkbox.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Render props may also be used as children to alter what elements are rendered ba
250250

251251
The states, selectors, and render props for `Checkbox` are documented below.
252252

253-
<StateTable properties={docs.exports.CheckboxRenderProps.properties} showOptional />
253+
<StateTable properties={docs.exports.CheckboxRenderProps.properties} />
254254

255255
## Reusable wrappers
256256

packages/react-aria-components/docs/ComboBox.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ The states and selectors for each component used in a `ComboBox` are documented
425425

426426
A `ComboBox` can be targeted with the `.react-aria-ComboBox` CSS selector, or by overriding with a custom `className`. It supports the following states:
427427

428-
<StateTable properties={docs.exports.ComboBoxRenderProps.properties} showOptional />
428+
<StateTable properties={docs.exports.ComboBoxRenderProps.properties} />
429429

430430
### Label
431431

packages/react-aria-components/docs/Meter.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ The selectors and render props for each component used in a `Meter` are document
181181

182182
A `Meter` can be targeted with the `.react-aria-Meter` CSS selector, or by overriding with a custom `className`. It supports the following states and render props:
183183

184-
<StateTable properties={docs.exports.MeterRenderProps.properties} showOptional />
184+
<StateTable properties={docs.exports.MeterRenderProps.properties} />
185185

186186
### Label
187187

packages/react-aria-components/docs/NumberField.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ The states, selectors, and render props for each component used in a `NumberFiel
287287

288288
A `NumberField` can be targeted with the `.react-aria-NumberField` CSS selector, or by overriding with a custom `className`. It supports the following states:
289289

290-
<StateTable properties={docs.exports.NumberFieldRenderProps.properties} showOptional />
290+
<StateTable properties={docs.exports.NumberFieldRenderProps.properties} />
291291

292292
### Label
293293

packages/react-aria-components/docs/ProgressBar.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ The selectors and render props for each component used in a `ProgressBar` are do
197197

198198
A `ProgressBar` can be targeted with the `.react-aria-ProgressBar` CSS selector, or by overriding with a custom `className`. It supports the following states and render props:
199199

200-
<StateTable properties={docs.exports.ProgressBarRenderProps.properties} showOptional />
200+
<StateTable properties={docs.exports.ProgressBarRenderProps.properties} />
201201

202202
### Label
203203

packages/react-aria-components/docs/TextField.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ The states, selectors, and render props for each component used in a `TextField`
220220

221221
A `TextField` can be targeted with the `.react-aria-TextField` CSS selector, or by overriding with a custom `className`. It supports the following states:
222222

223-
<StateTable properties={docs.exports.TextFieldRenderProps.properties} showOptional />
223+
<StateTable properties={docs.exports.TextFieldRenderProps.properties} />
224224

225225
### Label
226226

packages/react-aria-components/src/Calendar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface CalendarRenderProps {
3232
state: CalendarState,
3333
/**
3434
* Validation state of the date field.
35-
* @selector [data-validation-state]
35+
* @selector [data-validation-state="valid | invalid"]
3636
*/
3737
validationState: ValidationState
3838
}

packages/react-aria-components/src/Checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export interface CheckboxRenderProps {
9292
* Whether the checkbox is valid or invalid.
9393
* @selector [data-validation-state="valid | invalid"]
9494
*/
95-
validationState?: ValidationState,
95+
validationState: ValidationState | undefined,
9696
/**
9797
* Whether the checkbox is required.
9898
* @selector [data-required]

packages/react-aria-components/src/ComboBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ export interface ComboBoxRenderProps {
3535
isDisabled: boolean,
3636
/**
3737
* Validation state of the combobox.
38-
* @selector [data-validation-state]
38+
* @selector [data-validation-state="valid | invalid"]
3939
*/
40-
validationState?: ValidationState,
40+
validationState: ValidationState | undefined,
4141
/**
4242
* Whether the combobox is required.
4343
* @selector [data-required]

packages/react-aria-components/src/DateField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface DateFieldRenderProps {
2525
state: DateFieldState,
2626
/**
2727
* Validation state of the date field.
28-
* @selector [data-validation-state]
28+
* @selector [data-validation-state="valid | invalid"]
2929
*/
3030
validationState: ValidationState,
3131
/**

0 commit comments

Comments
 (0)