Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

convert-figma-svgs-for-react

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-figma-svgs-for-react - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

2

package.json
{
"name": "convert-figma-svgs-for-react",
"version": "1.0.7",
"version": "1.0.8",
"description": "A small script for a very specific use case.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

## Overview
A stopgap script for a very specific use case - having exported `.svg` files from Figma, I want to make them available as `.js` modules that just export the `<svg>` as a String, so that I can use it inline in `create-react-app` with `dangerouslySetInnerHTML`.
A stopgap script for a very specific use case - having exported `.svg` files from Figma, I want to make them available as `.js` modules that just export the `<svg>` as a String, so that I can use SVGSs inline in `create-react-app` with `dangerouslySetInnerHTML`.

@@ -12,1 +12,9 @@ Searches the directory supplied as the first command-line argument for `.svg` files to convert to `.js` files, which are named identically and placed in the same directory. *Not* a recursive search, only parses `.svg` files right in the specified directory.

```
If you just want to use the function that cleans up an SVG exported from Figma, so that it doesn't use `<defs>` and `<use>`, you can also
```javascript
var reformatFigmaSvg = require('convert-figma-svgs-for-react').reformatFigmaSvg
// or
import { reformatFigmaSvg } from 'convert-figma-svgs-for-react'
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc