Skip to content

Commit

Permalink
test(FormControl): update to include disabled leading visuals
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack committed Dec 2, 2024
1 parent 7114ad8 commit 528524c
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions packages/react/src/FormControl/FormControl.features.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from '..'
import {MarkGithubIcon, TriangleDownIcon} from '@primer/octicons-react'
import type {ItemInput} from '../deprecated/ActionList/List'
import {Stack} from '../Stack'

export default {
title: 'Components/FormControl/Features',
Expand Down Expand Up @@ -339,7 +340,7 @@ export const WithSelectPanel = () => {
}

export const WithLeadingVisual = () => (
<Box>
<Stack gap="none">
<FormControl>
<FormControl.Label>Option one</FormControl.Label>
<FormControl.LeadingVisual>
Expand All @@ -356,7 +357,24 @@ export const WithLeadingVisual = () => (
<Checkbox />
<FormControl.Caption>This one has a caption</FormControl.Caption>
</FormControl>
</Box>

<FormControl disabled>
<FormControl.Label>Option three</FormControl.Label>
<FormControl.LeadingVisual>
<MarkGithubIcon />
</FormControl.LeadingVisual>
<Checkbox />
</FormControl>

<FormControl disabled>
<FormControl.Label>Option four</FormControl.Label>
<FormControl.LeadingVisual>
<MarkGithubIcon />
</FormControl.LeadingVisual>
<Checkbox />
<FormControl.Caption>This one has a caption</FormControl.Caption>
</FormControl>
</Stack>
)

export const DisabledInputs = () => (
Expand Down

0 comments on commit 528524c

Please sign in to comment.