Skip to content

Commit

Permalink
Textarea: Add "title" to story example (#4983)
Browse files Browse the repository at this point in the history
* Add "title" to form example

* Add caption to explain purpose

* test(vrt): update snapshots

---------

Co-authored-by: TylerJDev <TylerJDev@users.noreply.github.com>
  • Loading branch information
TylerJDev and TylerJDev committed Sep 23, 2024
1 parent 84bf5d1 commit 3103978
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions packages/react/src/Textarea/Textarea.features.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import {Box, FormControl} from '..'
import {Box, FormControl, Heading} from '..'
import Textarea from '../Textarea'

export default {
Expand Down Expand Up @@ -27,9 +27,13 @@ export const WithCaption = () => (

export const VisuallyHiddenLabel = () => (
<Box as="form">
<Heading as="h2" variant="small">
Primer form title
</Heading>
<FormControl>
<FormControl.Label visuallyHidden>Default label</FormControl.Label>
<FormControl.Label visuallyHidden>Primer form label</FormControl.Label>
<Textarea />
<FormControl.Caption>Label is visually hidden; the title describes the purpose visually</FormControl.Caption>
</FormControl>
</Box>
)
Expand Down

0 comments on commit 3103978

Please sign in to comment.