diff --git a/packages/react/src/generators/component-story/component-story.spec.ts b/packages/react/src/generators/component-story/component-story.spec.ts index 97a631537c..5874d56d6c 100644 --- a/packages/react/src/generators/component-story/component-story.spec.ts +++ b/packages/react/src/generators/component-story/component-story.spec.ts @@ -156,7 +156,7 @@ describe('react:component-story', () => { title: 'Test', } as Meta; - const Template: Story<> = (args) => ; + const Template: Story = (args) => ; export const Primary = Template.bind({}); Primary.args = {}; diff --git a/packages/react/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ b/packages/react/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ index f232d83f6b..7507755491 100644 --- a/packages/react/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ +++ b/packages/react/src/generators/component-story/files/__componentFileName__.stories.__fileExt__ @@ -10,7 +10,7 @@ export default { <% } %> }<% if ( !isPlainJs ) { %> as Meta <% } %>; -const Template<% if ( !isPlainJs ) { %>: Story<<%= propsTypeName %>><% } %> = (args) => <<%= componentName %> {...args} />; +const Template<% if ( !isPlainJs ) { %>: Story<% if ( propsTypeName ) { %><<%= propsTypeName %>><% } %><% } %> = (args) => <<%= componentName %> {...args} />; export const Primary = Template.bind({}) Primary.args = {<% for (let prop of props) { %>