Skip to content

Commit

Permalink
refactor: move stories to preserve chromatic history
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioCastigliano committed Apr 26, 2024
1 parent 82d8acf commit c4aa463
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 40 deletions.
37 changes: 19 additions & 18 deletions src/components/checkbox/checkbox-group/checkbox-group.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const checkboxes = (
checked: boolean,
disabledSingle: boolean,
iconName: string,
iconPlacement: string,
iconPlacement: 'start' | 'end',
label: string,
): TemplateResult => html`
<sbb-checkbox
Expand Down Expand Up @@ -330,23 +330,6 @@ export const verticalToHorizontal: StoryObj = {
argTypes: checkboxArgTypes,
args: { ...checkboxArgsVertical, 'horizontal-from': 'medium' },
};
export const horizontalPanel: StoryObj = {
render: PanelTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs },
};

export const verticalPanel: StoryObj = {
render: PanelTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs, orientation: orientation.options![1] },
};

export const verticalToHorizontalPanel: StoryObj = {
render: PanelTemplate,
argTypes: checkboxArgTypes,
args: { ...basicArgs, orientation: orientation.options![1], 'horizontal-from': 'medium' },
};

export const horizontalSizeM: StoryObj = {
render: DefaultTemplate,
Expand Down Expand Up @@ -414,6 +397,24 @@ export const indeterminateGroup: StoryObj = {
args: { ...checkboxArgsVertical, checked: undefined },
};

export const horizontalPanel: StoryObj = {
render: PanelTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs },
};

export const verticalPanel: StoryObj = {
render: PanelTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs, orientation: orientation.options![1] },
};

export const verticalToHorizontalPanel: StoryObj = {
render: PanelTemplate,
argTypes: checkboxArgTypes,
args: { ...basicArgs, orientation: orientation.options![1], 'horizontal-from': 'medium' },
};

const meta: Meta = {
decorators: [withActions as Decorator],
parameters: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,28 +151,6 @@ export const VerticalToHorizontal: StoryObj = {
},
};

export const HorizontalPanels: StoryObj = {
render: PanelTemplate,
argTypes: defaultArgTypes,
args: { ...defaultArgs },
};

export const VerticalPanels: StoryObj = {
render: PanelTemplate,
argTypes: defaultArgTypes,
args: { ...defaultArgs, orientation: orientation.options![1] },
};

export const VerticalToHorizontalPanels: StoryObj = {
render: PanelTemplate,
argTypes: defaultArgTypes,
args: {
...defaultArgs,
orientation: orientation.options![1],
'horizontal-from': horizontalFrom.options![4],
},
};

export const HorizontalSizeS: StoryObj = {
render: DefaultTemplate,
argTypes: defaultArgTypes,
Expand Down Expand Up @@ -220,6 +198,28 @@ export const ErrorMessageVertical: StoryObj = {
},
};

export const HorizontalPanels: StoryObj = {
render: PanelTemplate,
argTypes: defaultArgTypes,
args: { ...defaultArgs },
};

export const VerticalPanels: StoryObj = {
render: PanelTemplate,
argTypes: defaultArgTypes,
args: { ...defaultArgs, orientation: orientation.options![1] },
};

export const VerticalToHorizontalPanels: StoryObj = {
render: PanelTemplate,
argTypes: defaultArgTypes,
args: {
...defaultArgs,
orientation: orientation.options![1],
'horizontal-from': horizontalFrom.options![4],
},
};

const meta: Meta = {
decorators: [withActions as Decorator],
parameters: {
Expand Down

0 comments on commit c4aa463

Please sign in to comment.