Skip to content

Instantly share code, notes, and snippets.

@MarwanRefaat
Created April 27, 2022 16:40
Show Gist options
  • Save MarwanRefaat/502be980319e8d7fcdd2f9282d01ea8e to your computer and use it in GitHub Desktop.
Save MarwanRefaat/502be980319e8d7fcdd2f9282d01ea8e to your computer and use it in GitHub Desktop.
Hack for Exporting Non-TypeScript File Type
/*
# Original `FileName.svg` Code (Vector Format)
```svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15">
<g fill="none" fill-rule="evenodd" stroke="#191919" stroke-width="2" transform="translate(1 1)">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.5 8.5l4.031 4.031"/>
<circle cx="5" cy="5" r="5"/>
</g>
</svg>
```
*/
const Stringified = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 15 15\">\n <g fill=\"none\" fill-rule=\"evenodd\" stroke=\"#191919\" stroke-width=\"2\" transform=\"translate(1 1)\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.5 8.5l4.031 4.031\"/>\n <circle cx=\"5\" cy=\"5\" r=\"5\"/>\n </g>\n</svg>"
export default Stringified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment