Skip to content

Commit 5f53393

Browse files
authored
Minor docs improvements (#5101)
1 parent f7aa828 commit 5f53393

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ A date picker consists of a label, and group containing a [date field](DateField
399399
`DatePicker` also supports optional description and error message elements, which can be used to provide more context about the field, and any validation messages. These are linked with the input via the `aria-describedby` attribute.
400400

401401
```tsx
402-
import {DatePicker, Label, Group, Popover, Dialog, Calendar, CalendarGrid, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, Button, Heading, DateInput, DateSegment, Text} from 'react-aria-components';
402+
import {DatePicker, Label, Group, Popover, Dialog, Calendar, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, Button, Heading, DateInput, DateSegment, Text} from 'react-aria-components';
403403

404404
<DatePicker>
405405
<Label />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ A date range picker consists of a label, and group containing two [date fields](
435435
`DateRangePicker` also supports optional description and error message elements, which can be used to provide more context about the field, and any validation messages. These are linked with the input via the `aria-describedby` attribute.
436436

437437
```tsx
438-
import {DateRangePicker, Label, Group, Popover, Dialog, RangeCalendar, CalendarGrid, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, Button, Heading, DateInput, DateSegment, Text} from 'react-aria-components';
438+
import {DateRangePicker, Label, Group, Popover, Dialog, RangeCalendar, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, Button, Heading, DateInput, DateSegment, Text} from 'react-aria-components';
439439

440440
<DateRangePicker>
441441
<Label />

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import {TextField, Label, Group, Input, Button} from 'react-aria-components';
4444
<Label>Email</Label>
4545
<Group>
4646
<Input />
47-
<Button aria-label="Add email"></Button>
47+
<Button aria-label="Add email">+</Button>
4848
</Group>
4949
</TextField>
5050
```
@@ -98,6 +98,7 @@ import {TextField, Label, Group, Input, Button} from 'react-aria-components';
9898
border-width: 0 0 0 1px;
9999
border-radius: 0 6px 6px 0;
100100
align-self: stretch;
101+
font-size: 1.5rem;
101102
}
102103
}
103104

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@ function TabNavigation() {
681681
let onNext = nextKey != null ? () => state.setSelectedKey(nextKey) : null;
682682
return (
683683
<div className="button-group">
684-
<Button aria-label="Previous tab" onPress={onPrev}></Button>
685-
<Button aria-label="Next tab" onPress={onNext}></Button>
684+
<Button aria-label="Previous tab" onPress={onPrev}></Button>
685+
<Button aria-label="Next tab" onPress={onNext}></Button>
686686
</div>
687687
);
688688
}
@@ -704,6 +704,14 @@ function TabNavigation() {
704704
</Tabs>
705705
```
706706

707+
```css hidden
708+
.button-group .react-aria-Button[aria-label] {
709+
font-size: 1.2rem;
710+
line-height: 1rem;
711+
font-weight: bold;
712+
}
713+
```
714+
707715
### Hooks
708716

709717
If you need to customize things even further, such as accessing internal state or customizing DOM structure, you can drop down to the lower level Hook-based API. See [useTabList](useTabList.html) for more details.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ function TimeZoneName() {
665665
return null;
666666
}
667667

668-
<TimeField defaultValue={parseAbsoluteToLocal('2021-04-07T18:45:22Z')}>
668+
<TimeField value={parseAbsoluteToLocal('2021-04-07T18:45:22Z')}>
669669
<Label>Time</Label>
670670
<DateInput>
671671
{segment => <DateSegment segment={segment} />}

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,13 @@ The documentation for each component includes many examples styled using vanilla
354354
<ToggleButton />
355355
</ExampleCard>
356356

357+
<ExampleCard
358+
url="FileTrigger.html"
359+
title="FileTrigger"
360+
description="A file trigger allows a user to access the file system with a Button.">
361+
<FileTrigger />
362+
</ExampleCard>
363+
357364
</section>
358365

359366
### Pickers
@@ -552,13 +559,6 @@ The documentation for each component includes many examples styled using vanilla
552559
<Slider />
553560
</ExampleCard>
554561

555-
<ExampleCard
556-
url="FileTrigger.html"
557-
title="FileTrigger"
558-
description="A file trigger allows a user to access the file system with a Button.">
559-
<FileTrigger />
560-
</ExampleCard>
561-
562562
</section>
563563

564564
### Navigation

0 commit comments

Comments
 (0)