divriots / story-to-design

Keep your Figma libraries true-to-code in a single click.
https://story.to.design
26 stars 0 forks source link

The button component does not import correctly #170

Open kgudim opened 2 months ago

kgudim commented 2 months ago

The button component does not import correctly. Buttons are imported as a group of buttons. This could potentially be our implementation in Storybook?


Bug report identity: Please do not edit

Task path: YytzbsMl5rszMeUq0PC2/lSLaPUL1sr0gTnV3PSOW/131qjllpdmr3g

muryoh commented 2 months ago

Hi @kgudim , sorry about the late reply!

Yes indeed, your story currently contains all 5 buttons at once: image

Ideally you'd want to have one button per story, and to have Storybook args controlling what variant of the button to be rendering

Now if you really wanted to, you could use the :selector special story.to.design arg to go and say "I want to capture this specific element of that story", that could work. But then you'd be subject to changes in the order of elements - I think it's not ideal, but if you really cannot make it so a single story only exposes a single button then that is possible. But it will make your setup more complex

Best regards, Remy