Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed radio controls for stories #512

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/react/src/Avatar/Avatar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ export default {
size: {
description: 'The size of the Avatar',
control: {
type: 'radio',
options: AvatarSizes,
type: 'inline-radio',
},
options: AvatarSizes,
},
shape: {
description: 'The shape of the Avatar',
control: {
type: 'radio',
options: AvatarShapes,
type: 'inline-radio',
},
options: AvatarShapes,
},
src: {
description: 'The url of the image to display',
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default {
control: {
type: 'inline-radio',
},
options: [...ButtonVariants],
options: ButtonVariants,
},
href: {
name: 'href',
Expand All @@ -48,7 +48,7 @@ export default {
control: {
type: 'inline-radio',
},
options: [...ButtonSizes],
options: ButtonSizes,
},
children: {
name: 'children',
Expand Down
12 changes: 6 additions & 6 deletions packages/react/src/ButtonGroup/ButtonGroup.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import React from 'react'
import {Meta, StoryFn} from '@storybook/react'
import {ButtonGroup} from '.'
import {Button} from '../Button'
import {Button, ButtonSizes, defaultButtonSize} from '../Button'

export default {
title: 'Components/ButtonGroup',
component: ButtonGroup,
subcomponents: {Button},
args: {
buttonSize: 'medium',
buttonSize: defaultButtonSize,
buttonsAs: 'button',
},
argTypes: {
buttonSize: {
description: 'The size of the button elements',
control: {
type: 'radio',
options: ['medium', 'large'],
type: 'inline-radio',
},
options: ButtonSizes,
},
buttonsAs: {
description: 'The HTML element the button is rendered as',
control: {
type: 'radio',
options: ['button', 'a'],
type: 'inline-radio',
},
options: ['button', 'a'],
},
children: {
table: {
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/CTABanner/CTABanner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default {
align: {
description: 'The alignment of the content',
control: {
type: 'radio',
options: ['start', 'center'],
type: 'inline-radio',
},
options: ['start', 'center'],
},
hasBorder: {
description: 'Toggle to show or hide the border',
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Card/Card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
control: {
type: 'inline-radio',
},
options: [...CardIconColors],
options: CardIconColors,
},
iconHasBackground: {
name: 'iconHasBackground',
Expand All @@ -41,7 +41,7 @@ export default {
control: {
type: 'inline-radio',
},
options: [...LabelColors],
options: LabelColors,
},
heading: {
name: 'heading',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ export default {
description: 'The HTML element used to render the root component.',
control: {
type: 'inline-radio',
options: ['section', 'large'],
},
options: ['section', 'large'],
table: {
category: 'ComparisonTable',
},
},
variant: {
control: {
type: 'inline-radio',
options: ['undefined', 'default', 'minimal'],
},
options: ['undefined', 'default', 'minimal'],
table: {
category: 'ComparisonTable',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/EyebrowBanner/EyebrowBanner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default {
control: {
type: 'inline-radio',
},
options: [...EyebrowBannerIconColors],
options: EyebrowBannerIconColors,
table: {
category: 'EyebrowBanner.Visual',
},
Expand Down
10 changes: 5 additions & 5 deletions packages/react/src/Heading/Heading.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,31 @@ Playground.argTypes = {
},
size: {
control: {
type: 'radio',
type: 'inline-radio',
},
options: HeadingSizes,
},
weight: {
control: {
type: 'radio',
type: 'inline-radio',
},
options: HeadingWeights,
},
stretch: {
control: {
type: 'radio',
type: 'inline-radio',
},
options: HeadingStretch,
},
letterSpacing: {
control: {
type: 'radio',
type: 'inline-radio',
},
options: HeadingLetterSpacing,
},
font: {
control: {
type: 'radio',
type: 'inline-radio',
},
options: HeadingFontVariants,
},
Expand Down
16 changes: 8 additions & 8 deletions packages/react/src/Image/Image.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ export default {
as: {
description: 'Sets the underlying HTML element',
control: {
type: 'radio',
options: ['img', 'picture'],
type: 'inline-radio',
},
options: ['img', 'picture'],
},
aspectRatio: {
description: 'Sets the image aspect ratio. A custom ratio can be provided in the design tokens.',
control: {
type: 'radio',
options: ['1:1', '16:9', '16:10', '4:3', 'custom'],
type: 'inline-radio',
},
options: ['1:1', '16:9', '16:10', '4:3', 'custom'],
},
width: {
description: 'The width of the image',
Expand All @@ -56,17 +56,17 @@ export default {
description:
'The loading attribute specifies whether a browser should load an image immediately or to defer loading of off-screen images until for example the user scrolls near them.',
control: {
type: 'radio',
options: ['eager', 'lazy'],
type: 'inline-radio',
},
options: ['eager', 'lazy'],
},
decoding: {
description:
'Sets the image decoding strategy. Representing a hint given to the browser on how it should decode the image.',
control: {
type: 'radio',
options: ['auto', 'sync', 'async'],
type: 'inline-radio',
},
options: ['auto', 'sync', 'async'],
},
},
} as Meta<typeof Image>
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Label/Label.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export default {
description: 'Color of Label',
control: {
type: 'inline-radio',
options: [...LabelColors],
},
options: LabelColors,
},
size: {
description: 'Size of Label',
control: {
type: 'inline-radio',
options: [...LabelSizes],
},
options: LabelSizes,
},
children: {
name: 'children',
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Pillar/Pillar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export default {
description: 'Color of Icon',
control: {
type: 'inline-radio',
options: [...PillarIconColors],
},
options: PillarIconColors,
},
heading: {
name: 'heading',
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/SectionIntro/SectionIntro.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export default {
align: {
description: 'The alignment of the SectionIntro',
control: {
type: 'radio',
options: ['start', 'center'],
type: 'inline-radio',
},
options: ['start', 'center'],
},
children: {
table: {
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/Testimonial/Testimonial.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export default {
argTypes: {
quoteMarkColor: {
control: {
type: 'radio',
options: TestimonialQuoteMarkColors,
type: 'inline-radio',
},
options: TestimonialQuoteMarkColors,
},
name: {
control: {type: 'text'},
Expand All @@ -38,7 +38,7 @@ export default {
},
type: {
options: ['avatar', 'logo'],
control: {type: 'radio'},
control: {type: 'inline-radio'},
},
width: {
control: {
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Text/Text.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ Playground.argTypes = {
},
size: {
control: {
type: 'radio',
type: 'inline-radio',
},
options: TextSizes,
},
weight: {
control: {
type: 'radio',
type: 'inline-radio',
},
options: TextWeights,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/animation/Animation.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Playground.argTypes = {
variant: {
control: {
type: 'inline-radio',
options: AnimationVariants,
},
options: AnimationVariants,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export default {
variant: {
description: 'Specify alternative leading visuals for list items',
control: {
type: 'radio',
options: ['default', 'checked'],
type: 'inline-radio',
},
options: ['default', 'checked'],
},
data: {
name: 'Data',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
accentColor: {
name: 'theme',
control: 'radio',
options: [...Object.keys(themeDetailsMap)],
options: Object.keys(themeDetailsMap),
table: {
category: 'Theming',
},
Expand Down