chore: clean up switch stories (#26057)

## Description
Clean up switch stories

---------

Co-authored-by: Valera Melnikov <melnikov.vv@greendatasoft.ru>
This commit is contained in:
Valera Melnikov 2023-08-04 21:56:45 +03:00 committed by GitHub
parent fa1eefa4d0
commit 65a662ee48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 130 additions and 135 deletions

View File

@ -6,9 +6,11 @@ on:
- release - release
paths: paths:
- 'app/client/packages/design-system/**' - 'app/client/packages/design-system/**'
- 'app/client/packages/storybook/**'
pull_request: pull_request:
paths: paths:
- 'app/client/packages/design-system/**' - 'app/client/packages/design-system/**'
- 'app/client/packages/storybook/**'
jobs: jobs:
chromatic-deployment: chromatic-deployment:

View File

@ -6,9 +6,11 @@ on:
- release - release
paths: paths:
- 'app/client/packages/design-system/**' - 'app/client/packages/design-system/**'
- 'app/client/packages/storybook/**'
pull_request: pull_request:
paths: paths:
- 'app/client/packages/design-system/**' - 'app/client/packages/design-system/**'
- 'app/client/packages/storybook/**'
jobs: jobs:
chromatic-deployment: chromatic-deployment:

View File

@ -21,9 +21,10 @@ Switch is a component that allows the user to select one or more options from a
<Story name="Switch">{Template.bind({})}</Story> <Story name="Switch">{Template.bind({})}</Story>
</Canvas> </Canvas>
<ArgsTable story="Switch" of={Switch} />
### States ### States
<Canvas>
<Story <Story
name="State - unchecked" name="State - unchecked"
args={{ args={{
@ -32,6 +33,7 @@ Switch is a component that allows the user to select one or more options from a
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
<Story <Story
name="State - Default Checked" name="State - Default Checked"
args={{ args={{
@ -41,6 +43,7 @@ Switch is a component that allows the user to select one or more options from a
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
<Story <Story
name="State - Disabled" name="State - Disabled"
args={{ args={{
@ -51,6 +54,7 @@ Switch is a component that allows the user to select one or more options from a
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
<Story <Story
name="State - Disabled unchecked" name="State - Disabled unchecked"
args={{ args={{
@ -60,11 +64,9 @@ Switch is a component that allows the user to select one or more options from a
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
</Canvas>
### Label Position ### Label Position
<Canvas>
<Story <Story
parameters={{ parameters={{
width: 250, width: 250,
@ -77,6 +79,7 @@ Switch is a component that allows the user to select one or more options from a
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
<Story <Story
parameters={{ parameters={{
width: 250, width: 250,
@ -89,4 +92,3 @@ Switch is a component that allows the user to select one or more options from a
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
</Canvas>

View File

@ -31,7 +31,6 @@ Switch Group is a group of checkboxes that can be selected together.
# Orientation # Orientation
<Canvas>
<Story <Story
args={{ args={{
orientation: "vertical", orientation: "vertical",
@ -40,6 +39,7 @@ Switch Group is a group of checkboxes that can be selected together.
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
<Story <Story
args={{ args={{
orientation: "horizontal", orientation: "horizontal",
@ -48,11 +48,9 @@ Switch Group is a group of checkboxes that can be selected together.
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
</Canvas>
# Emphasized # Emphasized
<Canvas>
<Story <Story
args={{ args={{
isEmphasized: true, isEmphasized: true,
@ -61,11 +59,9 @@ Switch Group is a group of checkboxes that can be selected together.
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
</Canvas>
# Label Position and Alignment # Label Position and Alignment
<Canvas>
<Story <Story
args={{ args={{
labelPosition: "side", labelPosition: "side",
@ -76,11 +72,9 @@ Switch Group is a group of checkboxes that can be selected together.
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
</Canvas>
# Is Disabled # Is Disabled
<Canvas>
<Story <Story
args={{ args={{
isDisabled: true, isDisabled: true,
@ -89,11 +83,9 @@ Switch Group is a group of checkboxes that can be selected together.
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
</Canvas>
# Is Required # Is Required
<Canvas>
<Story <Story
args={{ args={{
isRequired: true, isRequired: true,
@ -102,11 +94,9 @@ Switch Group is a group of checkboxes that can be selected together.
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
</Canvas>
# Invalid State # Invalid State
<Canvas>
<Story <Story
args={{ args={{
validationState: "invalid", validationState: "invalid",
@ -116,4 +106,3 @@ Switch Group is a group of checkboxes that can be selected together.
> >
{Template.bind({})} {Template.bind({})}
</Story> </Story>
</Canvas>