JSPM

  • Created
  • Published
  • Downloads 3633
  • Score
    100M100P100Q140759F
  • License MIT

Outputter for @figma-export that exports components as React components using svgr

Package Exports

  • @figma-export/output-components-as-svgr

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@figma-export/output-components-as-svgr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@figma-export/output-components-as-svgr

Outputter for @figma-export that exports components as React components.

With this outputter you can export all Figma components as React components into the specified output folder.

This is a sample of the output from this Figma file:

$ tree output/

# output
# ├── icons
# │   ├── FigmaArrow.jsx
# │   ├── FigmaExport.jsx
# │   ├── FigmaLogo.jsx
# │   └── index.js
# ├── monochrome
# │   ├── FigmaBlue.jsx
# │   ├── FigmaGreen.jsx
# │   ├── FigmaPurple.jsx
# │   ├── FigmaRed.jsx
# │   └── index.js
# └── unit-test
#     ├── figma
#     │   ├── logo
#     │   │   ├── Main.jsx
#     │   │   ├── MainBright.jsx
#     │   │   └── index.js
#     │   ├── Logo.jsx
#     │   └── index.js
#     ├── FigmaDefaultLogo.jsx
#     └── index.js

Tip: A figma component named icon/eye will be exported as Eye.jsx inside the icon folder. Another index.js file will be created inside the icon folder and this will export directly the Eye component.

Install

Using npm:

npm install --save-dev @figma-export/output-components-as-svgr

or using yarn:

yarn add @figma-export/output-components-as-svgr --dev