fix(storybook): if there is no propstype name do not add angle brackets

This commit is contained in:
Katerina Skroumpelou 2021-10-18 17:12:29 +03:00 committed by Juri Strumpflohner
parent 7b1860878f
commit ce9dbd011c
2 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ describe('react:component-story', () => {
title: 'Test',
} as Meta;
const Template: Story<> = (args) => <Test {...args} />;
const Template: Story = (args) => <Test {...args} />;
export const Primary = Template.bind({});
Primary.args = {};

View File

@ -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) { %>