You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by gkamlesh21 May 11, 2022
Hello Team, We have created a library using web components framework in storybook UI. Our purpose is to server that library in React and Angular. Is that possible to use cross framework in storybook UI.
//AtomicButton.stories.jsimport{AtomicButton}from'./AtomicButton'// More on default export: https://storybook.js.org/docs/web-components/writing-stories/introduction#default-exportexportdefault{title: 'Atoms/Button',// More on argTypes: https://storybook.js.org/docs/web-components/api/argtypesargTypes: {backgroundColor: {control: 'color'},onClick: {action: 'onClick'},type: {control: {type: 'select'},options: ['primary','primarySecondary','secondary'],},},};// More on component templates: https://storybook.js.org/docs/web-components/writing-stories/introduction#using-argsconstTemplate=(args)=>AtomicButton(args);exportconstPrimary=Template.bind({});// More on args: https://storybook.js.org/docs/web-components/writing-stories/argsPrimary.args={type: "primary",disabled: false,fullWidth:false,label: 'Primary Action',};
//In React Framework - App.jsimportlogofrom'./logo.svg';import'./App.css';importAtomicButtonfrom"@ui-practice/atomic-ui-components";functionApp(){return(<divclassName="App"><headerclassName="App-header"><p>
Edit <code>src/App.js</code> and save to reload.
</p><AtomicButtonlabel="Click Me"backgroundColor="#ac3620"primary/></header></div>);}exportdefaultApp;</div>
The text was updated successfully, but these errors were encountered:
Discussed in #18191
Originally posted by gkamlesh21 May 11, 2022
Hello Team, We have created a library using web components framework in storybook UI. Our purpose is to server that library in React and Angular. Is that possible to use cross framework in storybook UI.
Example.
AtomicButton.js
The text was updated successfully, but these errors were encountered: