hallee9000 / figma-icon-automation

A figma plugin that help you convert your icons' design file to react component and publish to NPM directly.
https://www.figma.com/community/plugin/739395588962138807/figma-icon-automation
189 stars 54 forks source link

the stroke width in svg is 2 times of pic in fimga #7

Closed jane-rose closed 4 years ago

jane-rose commented 4 years ago

The svg graph is larger than the graph derived from figma, and the stroke width is 2 times of the fimga.

image

image

hallee9000 commented 4 years ago

@jiantaolovebingbing I don't know what stack are you using now so I assume it's react. It's defined here so you can change the stroke in your own repo.

yingdi-cheng commented 4 years ago

我在figma设计这个图标时,粗细设置的是1px,想最后呈现时也是1px,但通过插件实现在页面上后,图标的粗细变成了2px,变成了原图2倍,效果图类似于上面的两个图标的对比图。因此想问一下是我们这边实现有哪些问题,还是哪里需要调整的,谢谢~

hallee9000 commented 4 years ago

@yingdi-cheng 你可以改一下自己图标仓库的代码,我的示例仓库中代码位置如下: React:https://github.com/leadream/juuust-icon/blob/master/bin/template.js#L15 Vue:https://github.com/leadream/juuust-vue-icon/blob/master/bin/template.js#L16