From f684264a55397f160e80d103c7206ae08da4602a Mon Sep 17 00:00:00 2001 From: Sangeetha Babu <58620134+sangeethababu9223@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:50:17 +0530 Subject: [PATCH] fix(Side Panel Web components): storybook controls issue --- .../side-panel/side-panel.stories.ts | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/ibm-products-web-components/src/components/side-panel/side-panel.stories.ts b/packages/ibm-products-web-components/src/components/side-panel/side-panel.stories.ts index 2a761d5233..b0569c0d7c 100644 --- a/packages/ibm-products-web-components/src/components/side-panel/side-panel.stories.ts +++ b/packages/ibm-products-web-components/src/components/side-panel/side-panel.stories.ts @@ -303,15 +303,15 @@ const getSlug = (index) => { const defaultTemplate = { args: { - actionItems: getActionItems(1), - actionToolbarItems: getActionToolbarItems(0), + actionItems: 1, + actionToolbarItems: 0, animateTitle: true, class: 'a-user-class', closeIconDescription: 'Close panel', condensedActions: false, - content: getContent(2), + content: 2, includeOverlay: true, - label: getLabel(2), + label: 2, open: false, placement: SIDE_PANEL_PLACEMENT.RIGHT, preventCloseOnClickOutside: false, @@ -319,8 +319,8 @@ const defaultTemplate = { selectorInitialFocus: '#side-panel-story-text-input-a', size: SIDE_PANEL_SIZE.MEDIUM, slideIn: false, - slug: getSlug(0), - subtitle: getSubTitle(1), + slug: 0, + subtitle: 1, title: 'This title is testing a very long title to see how this behaves with a longer title. It needs to be long enough to trigger overflow when collapsed.', }, @@ -424,7 +424,7 @@ const defaultTemplate = { current-step="0" ?include-overlay=${args.includeOverlay && !args.slideIn} selector-initial-focus=${args.selectorInitialFocus} - label-text="${args.label}" + label-text="${getLabel(args.label)}" ?open=${args.open} placement=${args.placement} ?prevent-close-on-click-outside=${args.preventCloseOnClickOutside} @@ -435,20 +435,20 @@ const defaultTemplate = { @c4p-side-panel-navigate-back=${prevStep} > - ${args.content} + ${getContent(args.content)} Step two - ${args.subtitle} + ${getSubTitle(args.subtitle)} - ${args.actionToolbarItems} + ${getActionToolbarItems(args.actionToolbarItems)} - ${args.actionItems} + ${getActionItems(args.actionItems)} - ${args.slug} + ${getSlug(args.slug)} `; }, @@ -470,7 +470,7 @@ export const WithActionToolbar = { ...defaultTemplate, args: { ...defaultTemplate.args, - actionToolbarItems: getActionToolbarItems(1), + actionToolbarItems: 1, }, }; @@ -479,7 +479,7 @@ export const SpecifyElementToHaveFocus = { args: { ...defaultTemplate.args, focusSelector: '#side-panel-story-text-input-a', - label: getLabel(0), + label: 0, }, argTypes: { ...defaultTemplate.argTypes, @@ -495,7 +495,7 @@ export const WithStaticTitle = { args: { ...defaultTemplate.args, animateTitle: false, - label: getLabel(0), + label: 0, }, }; @@ -503,9 +503,9 @@ export const WithStaticTitleAndActionToolbar = { ...defaultTemplate, args: { ...defaultTemplate.args, - actionToolbarItems: getActionToolbarItems(1), + actionToolbarItems: 1, animateTitle: false, - label: getLabel(0), + label: 0, }, }; @@ -513,7 +513,7 @@ export const WithoutTitle = { ...defaultTemplate, args: { ...defaultTemplate.args, - label: getLabel(0), + label: 0, title: '', }, };