Skip to content

Commit 97d13fa

Browse files
authored
Update Radio stories to no longer use styled-components (#6465)
1 parent 5a7e563 commit 97d13fa

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ coverage/
3434
# Playwright
3535
stats.html
3636
blob-report
37+
results.json
3738

3839
# TypeScript
3940
*.tsbuildinfo

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {MarkGithubIcon} from '@primer/octicons-react'
2-
import {Avatar, Box, FormControl, Radio} from '..'
2+
import {Avatar, FormControl, Radio} from '..'
33

44
export default {
55
title: 'Components/Radio/Features',
@@ -8,7 +8,7 @@ export default {
88

99
export const WithLeadingVisual = () => {
1010
return (
11-
<Box as="form">
11+
<form>
1212
<FormControl>
1313
<FormControl.LeadingVisual>
1414
<MarkGithubIcon />
@@ -23,29 +23,29 @@ export const WithLeadingVisual = () => {
2323
<Radio value="default" name="default-radio-name" />
2424
<FormControl.Label>Default label</FormControl.Label>
2525
</FormControl>
26-
</Box>
26+
</form>
2727
)
2828
}
2929

3030
export const Disabled = () => {
3131
return (
32-
<Box as="form">
32+
<form>
3333
<FormControl disabled>
3434
<Radio value="default" name="default-radio-name" />
3535
<FormControl.Label>Default label</FormControl.Label>
3636
</FormControl>
37-
</Box>
37+
</form>
3838
)
3939
}
4040

4141
export const WithCaption = () => {
4242
return (
43-
<Box as="form">
43+
<form>
4444
<FormControl>
4545
<Radio value="default" name="default-radio-name" />
4646
<FormControl.Label>Default label</FormControl.Label>
4747
<FormControl.Caption>This is a caption</FormControl.Caption>
4848
</FormControl>
49-
</Box>
49+
</form>
5050
)
5151
}

packages/react/src/Radio/Radio.stories.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type {Meta} from '@storybook/react-vite'
22
import type {RadioProps} from '..'
3-
import {Box, FormControl, Radio} from '..'
3+
import {FormControl, Radio} from '..'
44
import type {FormControlArgs} from '../utils/form-story-helpers'
55
import {
66
formControlArgs,
@@ -20,13 +20,13 @@ export const Playground = ({value: _value, ...args}: FormControlArgs<RadioProps>
2020
const {parentArgs, labelArgs, captionArgs} = getFormControlArgsByChildComponent(args)
2121

2222
return (
23-
<Box as="form">
23+
<form>
2424
<FormControl {...parentArgs}>
2525
<Radio name="default-radio-name" value="default" {...args} />
2626
<FormControl.Label {...labelArgs} />
2727
{captionArgs.children && <FormControl.Caption {...captionArgs} />}
2828
</FormControl>
29-
</Box>
29+
</form>
3030
)
3131
}
3232
Playground.argTypes = {
@@ -43,10 +43,10 @@ Playground.args = {
4343
}
4444

4545
export const Default = () => (
46-
<Box as="form">
46+
<form>
4747
<FormControl>
4848
<Radio name="default-radio-name" value="default" />
4949
<FormControl.Label>Label</FormControl.Label>
5050
</FormControl>
51-
</Box>
51+
</form>
5252
)

0 commit comments

Comments
 (0)