今日想介紹一個 Figma 小貼士,除咗 export 圖片,我哋都可以 copy as SVG 之後直接貼到 editor 作為 .svg file 或放入 React component,但前提 designer 要用 vector 而唔係 raster 圖。
export const Logo: FC<SVGProps<SVGSVGElement>> = props => (
// 貼上 SVG
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 484.88 461.23"
preserveAspectRatio="none" // proportionally scale
{...props} // spread props
>
<path d="M255.53,446.23c-102.85-1.19-193..." />
<path d="M161.57,461.23c-6.15-1.96-12.62..." />
</svg>
);