From 0c7b7ce0237dbd3d658f503f2526b189cd54f2da Mon Sep 17 00:00:00 2001 From: Ben Siggery Date: Tue, 26 Nov 2024 15:32:54 +0000 Subject: [PATCH] pr suggestions --- apps/pie-storybook/stories/pie-chip.stories.ts | 6 +++--- apps/pie-storybook/types/index.ts | 1 - apps/pie-storybook/utilities/index.ts | 2 +- .../src/app/templates/pie-placeholder.__stories__.ts | 5 ++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/pie-storybook/stories/pie-chip.stories.ts b/apps/pie-storybook/stories/pie-chip.stories.ts index cc7212f69f..f4d76e4c9f 100644 --- a/apps/pie-storybook/stories/pie-chip.stories.ts +++ b/apps/pie-storybook/stories/pie-chip.stories.ts @@ -2,10 +2,11 @@ import { html, nothing } from 'lit'; import { ifDefined } from 'lit/directives/if-defined.js'; import { action } from '@storybook/addon-actions'; import '@justeattakeaway/pie-chip'; -import '@justeattakeaway/pie-icons-webc/dist/IconHeartFilled.js'; - import { type ChipProps as ChipPropsBase, variants, defaultProps } from '@justeattakeaway/pie-chip'; import { type Meta } from '@storybook/web-components'; + +import '@justeattakeaway/pie-icons-webc/dist/IconHeartFilled.js'; + import { type SlottedComponentProps } from '../types'; import { @@ -27,7 +28,6 @@ const defaultArgs: ChipProps = { const chipStoryMeta: ChipStoryMeta = { title: 'Chip', - component: 'pie-chip', argTypes: { aria: { diff --git a/apps/pie-storybook/types/index.ts b/apps/pie-storybook/types/index.ts index 94b7e7e39e..65bebad12f 100644 --- a/apps/pie-storybook/types/index.ts +++ b/apps/pie-storybook/types/index.ts @@ -1,2 +1 @@ export * from './SlottedComponentProps'; -export * from './ExtendedMeta'; diff --git a/apps/pie-storybook/utilities/index.ts b/apps/pie-storybook/utilities/index.ts index d481cd082f..c973c46033 100644 --- a/apps/pie-storybook/utilities/index.ts +++ b/apps/pie-storybook/utilities/index.ts @@ -135,5 +135,5 @@ export const createVariantStory = ( disable: true, }, }, - // ...(storyOpts?.argTypes ? { argTypes: storyOpts?.argTypes } : {}), + ...(storyOpts?.argTypes ? { argTypes: storyOpts?.argTypes } : {}), }); diff --git a/packages/tools/generator-pie-component/src/app/templates/pie-placeholder.__stories__.ts b/packages/tools/generator-pie-component/src/app/templates/pie-placeholder.__stories__.ts index 2e5204619c..78174ff32a 100644 --- a/packages/tools/generator-pie-component/src/app/templates/pie-placeholder.__stories__.ts +++ b/packages/tools/generator-pie-component/src/app/templates/pie-placeholder.__stories__.ts @@ -1,19 +1,18 @@ import { html } from 'lit'; -import { ExtendedMeta } from '../types/ExtendedMeta'; +import { type Meta } from '@storybook/web-components'; import '@justeattakeaway/pie-<%= fileName %>'; import { type <%= componentName %>Props } from '@justeattakeaway/pie-<%= fileName %>'; import { createStory } from '../utilities'; -type <%= componentName %>StoryMeta = ExtendedMeta<<%= componentName %>Props>; +type <%= componentName %>StoryMeta = Meta<<%= componentName %>Props>; const defaultArgs: <%= componentName %>Props = {}; const <%= componentNameCamelCase %>StoryMeta: <%= componentName %>StoryMeta = { title: '<%= displayName %>', component: 'pie-<%= fileName %>', - showInTestingDeployment: true, argTypes: {}, args: defaultArgs, parameters: {