diff --git a/_templates/component/new/components_ComponentName_react_ComponentName.rootstory.tsx.ejs.t b/_templates/component/new/components_ComponentName_react_ComponentName.rootstory.tsx.ejs.t deleted file mode 100644 index 8929435ad..000000000 --- a/_templates/component/new/components_ComponentName_react_ComponentName.rootstory.tsx.ejs.t +++ /dev/null @@ -1,10 +0,0 @@ ---- -to: components/<%= h.inflection.camelize(name, false) %>/react/<%= h.inflection.camelize(name, false) %>.rootstory.tsx ---- -import * as React from 'react' -import <%= h.inflection.camelize(name, false) %> from './<%= h.inflection.camelize(name, false) %>' - -export default (options: { id?: string }) => { - const { id = 'foo', ...rest } = options - return <<%= h.inflection.camelize(name, false) %> id={id} {...rest} /> -} diff --git a/_templates/component/new/components_ComponentName_react_ComponentNameReact.cy.tsx.ejs.t b/_templates/component/new/components_ComponentName_react_ComponentNameReact.cy.tsx.ejs.t index cfea5241b..dd5607175 100644 --- a/_templates/component/new/components_ComponentName_react_ComponentNameReact.cy.tsx.ejs.t +++ b/_templates/component/new/components_ComponentName_react_ComponentNameReact.cy.tsx.ejs.t @@ -5,12 +5,14 @@ to: components/<%= h.inflection.camelize(name, false) %>/react/<%= h.inflection. import * as React from 'react' import { mount } from 'cypress/react18' -import <%= h.inflection.camelize(name, false) %>Story from './<%= h.inflection.camelize(name, false) %>.rootstory' +import <%= h.inflection.camelize(name, false) %> from './<%= h.inflection.camelize(name, false) %>' import assertions from '../assertions' describe('<%= h.inflection.camelize(name, false) %>', () => { - function mountStory(options: ParametersStory>[0] = {}) { - mount(<<%= h.inflection.camelize(name, false) %>Story {...options} />) + function mountStory( + options: Parameters>[0] = { id: '1' }, + ) { + mount(<<%= h.inflection.camelize(name, false) %> {...options} />) } assertions(mountStory) }) diff --git a/_templates/component/new/components_ComponentName_vue_ComponentName.rootstory.tsx.ejs.t b/_templates/component/new/components_ComponentName_vue_ComponentName.rootstory.tsx.ejs.t deleted file mode 100644 index 52c603ca5..000000000 --- a/_templates/component/new/components_ComponentName_vue_ComponentName.rootstory.tsx.ejs.t +++ /dev/null @@ -1,9 +0,0 @@ ---- -to: components/<%= h.inflection.camelize(name, false) %>/vue/<%= h.inflection.camelize(name, false) %>.rootstory.tsx ---- -import <%= h.inflection.camelize(name, false) %> from './<%= h.inflection.camelize(name, false) %>.vue' - -export default (options: { id?: string }) => { - const { id = 'foo', ...rest } = options - return <<%= h.inflection.camelize(name, false) %> id={id} {...rest} /> -} diff --git a/_templates/component/new/components_ComponentName_vue_ComponentNameVue.cy.tsx.ejs.t b/_templates/component/new/components_ComponentName_vue_ComponentNameVue.cy.tsx.ejs.t index 111b60a89..a5f797ca9 100644 --- a/_templates/component/new/components_ComponentName_vue_ComponentNameVue.cy.tsx.ejs.t +++ b/_templates/component/new/components_ComponentName_vue_ComponentNameVue.cy.tsx.ejs.t @@ -4,11 +4,13 @@ to: components/<%= h.inflection.camelize(name, false) %>/vue/<%= h.inflection.ca /// import { mount } from 'cypress/vue' import assertions from '../assertions' -import <%= h.inflection.camelize(name, false) %>Story from './<%= h.inflection.camelize(name, false) %>.rootstory' +import <%= h.inflection.camelize(name, false) %> from './<%= h.inflection.camelize(name, false) %>.vue' describe('<<%= h.inflection.camelize(name, false) %>/>', () => { - function mountStory(options: ParametersStory>[0] = {}) { - mount(() => <<%= h.inflection.camelize(name, false) %>Story {...options} />) + function mountStory( + options: Parameters>[0] = { id: '1' }, + ) { + mount(() => <<%= h.inflection.camelize(name, false) %> {...options} />) } assertions(mountStory) })