Skip to content

Commit

Permalink
test(panel, flow-item): add scale control to simple stories (#9747)
Browse files Browse the repository at this point in the history
**Related Issue:** #6980 

## Summary
Adding scale control to the simple stories on storybook
  • Loading branch information
DitwanP authored Jul 9, 2024
1 parent 1e04276 commit 3319135
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default {
collapsed: false,
collapseDirection: collapseDirection.defaultValue,
heightScale: scale.defaultValue,
scale: scale.defaultValue,
loading: false,
},
argTypes: {
Expand All @@ -34,6 +35,10 @@ export default {
options: scale.values,
control: { type: "select" },
},
scale: {
options: scale.values,
control: { type: "select" },
},
},
};

Expand Down Expand Up @@ -86,9 +91,11 @@ export const simple = (args: FlowItemStoryArgs): string => html`
${boolean("collapsed", args.collapsed)}
collapse-direction="${args.collapseDirection}"
height-scale="${args.heightScale}"
scale="${args.scale}"
${boolean("loading", args.loading)}
heading="Heading"
description="A wonderful flow item description"
>
${headerHTML}
<calcite-action text="Action" label="Action" slot="${SLOTS.headerActionsStart}" icon="bluetooth"></calcite-action>
<calcite-action text="Action" label="Action" slot="${SLOTS.headerActionsEnd}" icon="attachment"></calcite-action>
${contentHTML}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default {
collapsible: false,
collapseDirection: collapseDirection.defaultValue,
heightScale: scale.defaultValue,
scale: scale.defaultValue,
loading: false,
},
argTypes: {
Expand All @@ -34,6 +35,10 @@ export default {
options: scale.values,
control: { type: "select" },
},
scale: {
options: scale.values,
control: { type: "select" },
},
},
};

Expand Down Expand Up @@ -84,9 +89,11 @@ export const simple = (args: PanelStoryArgs): string => html`
${boolean("collapsible", args.collapsible)}
collapseDirection="${args.collapseDirection}"
heightScale="${args.heightScale}"
scale="${args.scale}"
${boolean("loading", args.loading)}
heading="Heading"
description="A great panel description"
>
${headerHTML}
<calcite-action text="Action" label="Action" slot="${SLOTS.headerActionsStart}" icon="bluetooth"></calcite-action>
<calcite-action text="Action" label="Action" slot="${SLOTS.headerActionsEnd}" icon="attachment"></calcite-action>
${contentHTML}
Expand Down

0 comments on commit 3319135

Please sign in to comment.