Skip to content

Commit

Permalink
chore(selection-panel): set chromatic min-height
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMenga committed Jan 23, 2024
1 parent ca278d5 commit 4756494
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/components/selection-panel/selection-panel.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ const WithCheckboxGroupTemplate = ({
disabledInput,
...args
}: Args): TemplateResult => html`
<sbb-checkbox-group orientation="vertical" horizontal-from="large">
<sbb-checkbox-group
orientation="vertical"
horizontal-from="large"
style="${isChromatic() ? 'min-height: 750px;' : ''}"
>
<sbb-selection-panel ${sbbSpread(args)}>
${cardBadge()}
<sbb-checkbox ?checked=${checkedInput}> Value one ${suffixAndSubtext()} </sbb-checkbox>
Expand Down Expand Up @@ -180,6 +184,7 @@ const WithRadioButtonGroupTemplate = ({
orientation="vertical"
horizontal-from="large"
?allow-empty-selection=${allowEmptySelection}
style="${isChromatic() ? 'min-height: 750px;' : ''}"
>
<sbb-selection-panel ${sbbSpread(args)}>
${cardBadge()}
Expand Down Expand Up @@ -210,7 +215,11 @@ const TicketsOptionsExampleTemplate = ({
disabledInput,
...args
}: Args): TemplateResult => html`
<sbb-checkbox-group orientation="vertical" horizontal-from="large">
<sbb-checkbox-group
orientation="vertical"
horizontal-from="large"
style="${isChromatic() ? 'min-height: 750px;' : ''}"
>
<sbb-selection-panel ${sbbSpread(args)}>
${cardBadge()}
<sbb-checkbox ?checked=${checkedInput}> Saving ${suffixAndSubtext()} </sbb-checkbox>
Expand Down Expand Up @@ -338,7 +347,11 @@ const NestedCheckboxTemplate = ({
disabledInput,
...args
}: Args): TemplateResult => html`
<sbb-checkbox-group orientation="vertical" horizontal-from="large">
<sbb-checkbox-group
orientation="vertical"
horizontal-from="large"
style="${isChromatic() ? 'min-height: 350px;' : ''}"
>
<sbb-selection-panel ${sbbSpread(args)}>
<sbb-checkbox value="mainoption1" ?checked=${checkedInput}> Main Option 1 </sbb-checkbox>
<sbb-checkbox-group orientation="vertical" slot="content">
Expand Down Expand Up @@ -370,6 +383,7 @@ const WithCheckboxesErrorMessageTemplate = ({
<sbb-checkbox-group
orientation="vertical"
horizontal-from="large"
style="${isChromatic() ? 'min-height: 750px;' : ''}"
@change=${(event: Event) => {
const checkboxGroup = event.currentTarget as HTMLElement;
const hasChecked = Array.from(checkboxGroup.querySelectorAll('sbb-checkbox')).some(
Expand Down Expand Up @@ -719,7 +733,9 @@ export const NestedCheckboxes: StoryObj = {

const meta: Meta = {
decorators: [
(story) => html` <div style="padding: 2rem;">${story()}</div> `,
(story) => html`
<div style="padding: 2rem;${isChromatic() ? 'min-height: 750px;' : ''}">${story()}</div>
`,
withActions as Decorator,
],
parameters: {
Expand Down

0 comments on commit 4756494

Please sign in to comment.