From 705b302aac28c98be7c451c5b4c7de25b00ee134 Mon Sep 17 00:00:00 2001 From: Simon Adcock Date: Mon, 16 Aug 2021 12:00:50 +0100 Subject: [PATCH] apply new storybook practices --- src/core/components/radio/Radio.stories.tsx | 155 ++++++------- .../components/radio/RadioGroup.stories.tsx | 204 ++++++++---------- 2 files changed, 156 insertions(+), 203 deletions(-) diff --git a/src/core/components/radio/Radio.stories.tsx b/src/core/components/radio/Radio.stories.tsx index c34a3fafc..7af4f80a6 100644 --- a/src/core/components/radio/Radio.stories.tsx +++ b/src/core/components/radio/Radio.stories.tsx @@ -12,130 +12,113 @@ import { asPlayground, asChromaticStory } from '../../../lib/story-intents'; export default { title: 'Source/src-radio/Radio', component: Radio, -}; - -const Template: Story = (args: RadioProps) => ; -Template.args = { - label: 'Red', - value: 'red', - supporting: '', - checked: true, -}; - -export const Playground = Template.bind({}); -Playground.argTypes = { - label: { - control: { - type: 'text', + argTypes: { + label: { + control: { + type: 'text', + }, }, - }, - supporting: { - control: { - type: 'text', + supporting: { + control: { + type: 'text', + }, + }, + cssOverrides: { + control: null, }, }, - cssOverrides: { - control: null, + args: { + label: 'Red', + value: 'red', + supporting: '', + checked: true, }, }; -Playground.args = { - ...Template.args, -}; + +const Template: Story = (args: RadioProps) => ; + +// ***************************************************************************** + +export const Playground = Template.bind({}); asPlayground(Playground); -export const Default = Template.bind({}); -Default.parameters = { - controls: { - disabled: true, - }, -}; -Default.args = { - ...Template.args, -}; -asChromaticStory(Default); +// ***************************************************************************** -export const DefaultBrand = (args: RadioProps) => ( - {Template(args)} +export const DefaultLightTheme = Template.bind({}); +asChromaticStory(DefaultLightTheme); + +// ***************************************************************************** + +export const DefaultBrandTheme = (args: RadioProps) => ( + +