Skip to content

Commit 3103978

Browse files
committed
Textarea: Add "title" to story example (#4983)
* Add "title" to form example * Add caption to explain purpose * test(vrt): update snapshots --------- Co-authored-by: TylerJDev <[email protected]>
1 parent 84bf5d1 commit 3103978

10 files changed

+6
-2
lines changed
6.72 KB
Loading
6.59 KB
Loading
6.73 KB
Loading
6.72 KB
Loading
6.72 KB
Loading
6.68 KB
Loading
6.65 KB
Loading
6.68 KB
Loading
6.68 KB
Loading

packages/react/src/Textarea/Textarea.features.stories.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import {Box, FormControl} from '..'
2+
import {Box, FormControl, Heading} from '..'
33
import Textarea from '../Textarea'
44

55
export default {
@@ -27,9 +27,13 @@ export const WithCaption = () => (
2727

2828
export const VisuallyHiddenLabel = () => (
2929
<Box as="form">
30+
<Heading as="h2" variant="small">
31+
Primer form title
32+
</Heading>
3033
<FormControl>
31-
<FormControl.Label visuallyHidden>Default label</FormControl.Label>
34+
<FormControl.Label visuallyHidden>Primer form label</FormControl.Label>
3235
<Textarea />
36+
<FormControl.Caption>Label is visually hidden; the title describes the purpose visually</FormControl.Caption>
3337
</FormControl>
3438
</Box>
3539
)

0 commit comments

Comments
 (0)