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

New component issue report #148

Closed jeremieparet closed 3 months ago

jeremieparet commented 3 months ago

dropdown issue (Regate)


Bug report identity: Please do not edit

Task path: ep257UoJEMTnEDJeFpEl/xNheoeHmoaDi6ZJmPDqE/16ehl6g1fcruab

georges-gomes commented 3 months ago

Note: Apparently a max-width: max-content is sent in code and is applying a max width in Figma at an arbitrary size. Among other things

muryoh commented 3 months ago

Hi @jeremieparet!

I just had a look - this component falls in a specific case, let me explain :) story.to.design tends to optimize for auto-resizing components because that's what a lot of designers expect in Figma. However a lot of components in the DOM actually do not resize: that's typically the case for a display flex or block element which is full width in the DOM To make up for this, story.to.design by default forces top level elements to render as fit content resulting in what you see

The long story short is that setting a viewport when importing the component will fix it:

image

will properly result in

image

(I do not have the proper font installed so icons are still missing but they will hopefully render properly when the font is installed)

Let me know if that's good enough for you otherwise we'll close the issue at some point

Cheers Remy

muryoh commented 3 months ago

Hi @jeremieparet, I'm closing the issue as the proper configuration has been provided

Don't hesitate to reopen or comment back if you think it was not adequate

Cheers, Remy