convert-figma-svgs-for-react
Advanced tools
Comparing version 1.0.8 to 1.1.0
{ | ||
"name": "convert-figma-svgs-for-react", | ||
"version": "1.0.8", | ||
"version": "1.1.0", | ||
"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 SVGSs inline in `create-react-app` with `dangerouslySetInnerHTML`. | ||
Not maintained with much intention - built for a very specific use case, with no | ||
real testing. But I'll care more if someone else does, so definitely file an | ||
issue if you this seems useful and something seems broken or missing. | ||
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. | ||
Having exported `.svg` files from Figma, I want to make them available as `.js` | ||
modules that just export the `<svg>` contents as a String, so that I can use | ||
SVGs inline in `create-react-app` with `dangerouslySetInnerHTML`. | ||
For command-line use, this script searches the directory supplied as the first | ||
command-line argument for `*.svg` files to convert. The converted `.js` files | ||
are named identically and placed in the same directory. | ||
**It does NOT search sub-folders recursively** - it only parses `.svg` files | ||
right in the specified directory. | ||
## Usage | ||
``` | ||
```shell | ||
convert-figma-svgs-for-react ./path/to/svg/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 | ||
It's probably convenient to set this up as a script in `package.json`, so you | ||
can run it before builds, or conveniently use it with a watcher, or whatever. | ||
```json | ||
{ | ||
"scripts": { | ||
"convert-svg": "convert-figma-svgs-for-react ./path/to/svg/directory" | ||
} | ||
} | ||
``` | ||
If you want to clean up an SVG string exported from Figma, (replacing `<use>` | ||
with actual paths, and removing `<defs>`), you can also call the reformatting | ||
function directly... | ||
```javascript | ||
@@ -20,1 +44,35 @@ var reformatFigmaSvg = require('convert-figma-svgs-for-react').reformatFigmaSvg | ||
``` | ||
## Configuration | ||
You can set the `<title>` and `<desc>` of each converted SVG file by include a | ||
`convert-figma-svg.config.json` file in the directory being converted: | ||
```json | ||
{ | ||
"meta_tags": { | ||
"acme_logo": { | ||
"title": "Acme Logo", | ||
"desc": "The diamond-shaped logo of the Acme corporation." | ||
} | ||
} | ||
} | ||
``` | ||
Or, if calling the function directly on an SVG string, | ||
```javascript | ||
reformatFigmaSvg(mySvgString, { | ||
title: 'Acme Logo', | ||
desc: 'The diamond-shaped logo of the Acme corporation.' | ||
}) | ||
``` | ||
If no configuration is provided, this script replaces the `<title>` with the | ||
SVG's filename (or an empty string when using `reformatFigmaSvg` directly) and | ||
the `<desc>` with an empty string. | ||
Why? When exporting, Figma seems to set the `<title>` of the SVG to the name of | ||
the exported group, and the `<desc>` to `Created using Figma`. Resetting the | ||
description to an empty string helps avoid situations where `Created using | ||
Figma` shows up in search results from SVGs embedded early on the page. |
@@ -9,3 +9,4 @@ var fs = require('fs') | ||
onCompletion, | ||
onError | ||
onError, | ||
CONFIG | ||
) { | ||
@@ -26,3 +27,3 @@ fs.readdir(dirname, function(err, filenames) { | ||
} | ||
onFileContent(dirname, filename, content) | ||
onFileContent(dirname, filename, content, CONFIG) | ||
if (index === count - 1) { | ||
@@ -29,0 +30,0 @@ onCompletion() |
@@ -17,3 +17,5 @@ const { JSDOM } = require('jsdom') | ||
// <use> to the clone of the path that replaces it. | ||
function reformatFigmaSvg(figmaSvg) { | ||
function reformatFigmaSvg(figmaSvg, CONFIG, identifier) { | ||
identifier = identifier || '' | ||
CONFIG = CONFIG || {} | ||
// Initialize JSDOM on the SVG document | ||
@@ -31,2 +33,14 @@ var dom = new JSDOM(figmaSvg) | ||
defs.remove() | ||
// Set the <title> and <desc> of the SVG | ||
const metaTags = | ||
CONFIG.title || CONFIG.desc | ||
? CONFIG | ||
: CONFIG.meta_tags && CONFIG.meta_tags[identifier] | ||
? CONFIG.meta_tags[identifier] | ||
: false | ||
var title = svgDocument.querySelector('title') | ||
title.textContent = (metaTags && metaTags.title) || identifier | ||
var desc = svgDocument.querySelector('desc') | ||
desc.textContent = (metaTags && metaTags.desc) || '' | ||
// Return the reformatted SVG as a string | ||
@@ -33,0 +47,0 @@ return svgDocument.querySelector('svg').outerHTML |
var fs = require('fs') | ||
const path = require('path') | ||
@@ -6,5 +7,9 @@ var replaceExt = require('replace-ext') | ||
const CONFIG_FILENAME = 'convert-figma-svg.config.json' | ||
// This readSvgFiles function is probably available as an NPM package... | ||
const readConfig = require('./helpers/readConfig.js') | ||
const readSvgFiles = require('./helpers/readSvgFiles.js') | ||
const reformatFigmaSvg = require('./helpers/reformatFigmaSvg.js') | ||
module.exports.reformatFigmaSvg = reformatFigmaSvg | ||
@@ -20,4 +25,5 @@ // This is a script to make any SVGs available as modules that export an SVG string. | ||
// And, it won't fix the Figma export issues | ||
function handleSvgFile(dirname, filename, content) { | ||
const svgString = reformatFigmaSvg(content) | ||
function handleSvgFile(dirname, filename, content, CONFIG) { | ||
const identifier = path.basename(filename, path.extname(filename)) | ||
const svgString = reformatFigmaSvg(content, CONFIG, identifier) | ||
// Strip newlines to prevent JS errors | ||
@@ -51,3 +57,3 @@ const strippedNewlines = svgString.replace(/\n/g, '') | ||
function handleError(err) { | ||
console.log(chalk.red('ERR! ')) | ||
console.log(chalk.red('ERROR! ')) | ||
console.log(chalk.red(err)) | ||
@@ -58,9 +64,35 @@ } | ||
console.log(chalk.italic.gray('Searching ' + directory + ' ...')) | ||
readSvgFiles( | ||
directory, | ||
handleSvgFileCount, | ||
handleSvgFile, | ||
handleCompletion, | ||
handleError | ||
) | ||
readConfig(CONFIG_FILENAME, directory, function(err, contents) { | ||
let CONFIG = {} | ||
if (err) { | ||
console.log( | ||
chalk.keyword('orange')( | ||
'No config file (' + CONFIG_FILENAME + ') found in ' + dirname + ' .' | ||
) | ||
) | ||
console.log( | ||
chalk.italic.gray('Descriptions for all SVG files will be removed.') | ||
) | ||
} else { | ||
try { | ||
CONFIG = JSON.parse(contents) | ||
console.log( | ||
chalk.green('✔') + | ||
' Found valid configuration file: ' + | ||
chalk.green(CONFIG_FILENAME) | ||
) | ||
} catch (err) { | ||
console.log(chalk.red('ERROR!')) | ||
console.log(chalk.red(err)) | ||
} | ||
} | ||
readSvgFiles( | ||
directory, | ||
handleSvgFileCount, | ||
handleSvgFile, | ||
handleCompletion, | ||
handleError, | ||
CONFIG | ||
) | ||
}) | ||
} |
@@ -1,1 +0,1 @@ | ||
export default '<svg width="25" height="24" viewBox="0 0 25 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>icon_cart_24x24</title><desc>Created using Figma</desc><g id="Canvas" transform="translate(-1592 941)"><g id="icon_cart_24x24"><g id="Vector 9"><path id="path0_stroke" d="M 0 -0.5C -0.276142 -0.5 -0.5 -0.276142 -0.5 0C -0.5 0.276142 -0.276142 0.5 0 0.5L 0 -0.5ZM 2.75 0L 3.21897 -0.173404C 3.14639 -0.369681 2.95927 -0.5 2.75 -0.5L 2.75 0ZM 18.1875 8.73145L 18.2435 9.2283C 18.4411 9.20601 18.6068 9.06873 18.6653 8.87867L 18.1875 8.73145ZM 19.9688 2.9502L 20.4466 3.09742C 20.4933 2.94575 20.4653 2.7809 20.371 2.65322C 20.2767 2.52554 20.1275 2.4502 19.9688 2.4502L 19.9688 2.9502ZM 3.84085 2.9502L 3.37188 3.1236C 3.37534 3.13293 3.37907 3.14217 3.38307 3.15128L 3.84085 2.9502ZM 17.2812 13.4814C 17.5574 13.4814 17.7812 13.2576 17.7812 12.9814C 17.7812 12.7053 17.5574 12.4814 17.2812 12.4814L 17.2812 13.4814ZM 6.15625 11.3955L 6.5793 11.662C 6.5839 11.6547 6.58831 11.6473 6.59253 11.6398L 6.15625 11.3955ZM 7.07031 12.9814L 7.07031 12.4814C 7.06374 12.4814 7.05716 12.4816 7.05059 12.4818L 7.07031 12.9814ZM 0 0.5L 2.75 0.5L 2.75 -0.5L 0 -0.5L 0 0.5ZM 6.99353 10.4969L 18.2435 9.2283L 18.1315 8.23459L 6.88147 9.50315L 6.99353 10.4969ZM 18.6653 8.87867L 20.4466 3.09742L 19.4909 2.80297L 17.7097 8.58422L 18.6653 8.87867ZM 2.28103 0.173404L 3.37188 3.1236L 4.30982 2.77679L 3.21897 -0.173404L 2.28103 0.173404ZM 3.38307 3.15128L 6.47972 10.2011L 7.39528 9.79892L 4.29864 2.74911L 3.38307 3.15128ZM 19.9688 2.4502L 3.84085 2.4502L 3.84085 3.4502L 19.9688 3.4502L 19.9688 2.4502ZM 6.50122 9.75575L 5.71997 11.1513L 6.59253 11.6398L 7.37378 10.2442L 6.50122 9.75575ZM 6.15625 11.3955C 5.7332 11.129 5.73312 11.1291 5.73304 11.1293C 5.73301 11.1293 5.73292 11.1294 5.73286 11.1295C 5.73279 11.1296 5.73261 11.1299 5.73247 11.1301C 5.73231 11.1304 5.7319 11.1311 5.73156 11.1316C 5.73111 11.1323 5.7301 11.134 5.7292 11.1354C 5.72784 11.1376 5.72512 11.1421 5.72246 11.1465C 5.71801 11.1539 5.71002 11.1674 5.70174 11.1819C 5.68698 11.2077 5.66268 11.2522 5.63834 11.3007C 5.59339 11.3911 5.52741 11.5428 5.48104 11.6975C 5.39788 11.9818 5.30821 12.528 5.71341 12.941L 6.42722 12.2407C 6.42617 12.2396 6.37946 12.1881 6.44083 11.9783C 6.46673 11.8859 6.4984 11.8165 6.53304 11.7474C 6.54851 11.7162 6.55948 11.6964 6.57005 11.6779C 6.57444 11.6702 6.57662 11.6665 6.57918 11.6623C 6.58003 11.6609 6.58003 11.6609 6.5805 11.6601C 6.58052 11.6601 6.58024 11.6605 6.58023 11.6605C 6.58033 11.6604 6.5798 11.6612 6.57985 11.6612C 6.57992 11.661 6.57955 11.6616 6.57959 11.6616C 6.57955 11.6616 6.57947 11.6617 6.57945 11.6618C 6.57937 11.6619 6.5793 11.662 6.15625 11.3955ZM 5.71341 12.941C 5.9979 13.2151 6.37595 13.3733 6.6104 13.4286C 6.7374 13.4571 6.86338 13.4723 6.93682 13.4775C 6.97793 13.4802 7.01743 13.4814 7.03908 13.4816C 7.05194 13.4817 7.06495 13.4816 7.07148 13.4815C 7.07572 13.4815 7.08043 13.4814 7.08255 13.4813C 7.08409 13.4813 7.08598 13.4812 7.08675 13.4812C 7.08737 13.4812 7.0882 13.4811 7.08851 13.4811C 7.08878 13.4811 7.08916 13.4811 7.0893 13.4811C 7.08943 13.4811 7.08961 13.4811 7.08967 13.4811C 7.08986 13.4811 7.09003 13.4811 7.07031 12.9814C 7.05059 12.4818 7.05077 12.4818 7.05094 12.4818C 7.05099 12.4818 7.05116 12.4818 7.05127 12.4818C 7.05117 12.4818 7.0521 12.4818 7.0519 12.4818C 7.05174 12.4818 7.05335 12.4817 7.05301 12.4817C 7.05282 12.4818 7.05505 12.4817 7.05464 12.4817C 7.05479 12.4817 7.05582 12.4817 7.05561 12.4817C 7.05325 12.4817 7.0531 12.4817 7.04893 12.4817C 7.03652 12.4816 7.02646 12.4814 7.00556 12.4798C 6.95498 12.4765 6.90713 12.4716 6.83491 12.4542C 6.67092 12.4178 6.54898 12.3806 6.42722 12.2407L 5.71341 12.941ZM 7.07031 13.4814L 17.2812 13.4814L 17.2812 12.4814L 7.07031 12.4814L 7.07031 13.4814Z" transform="translate(1593.45 -937.57)"></path></g><g id="Ellipse 8"><path id="path1_stroke" d="M 2.8252 1.6626C 2.8252 2.30468 2.30468 2.8252 1.6626 2.8252L 1.6626 3.8252C 2.85697 3.8252 3.8252 2.85697 3.8252 1.6626L 2.8252 1.6626ZM 1.6626 2.8252C 1.02051 2.8252 0.5 2.30468 0.5 1.6626L -0.5 1.6626C -0.5 2.85697 0.468228 3.8252 1.6626 3.8252L 1.6626 2.8252ZM 0.5 1.6626C 0.5 1.02051 1.02051 0.5 1.6626 0.5L 1.6626 -0.5C 0.468228 -0.5 -0.5 0.468228 -0.5 1.6626L 0.5 1.6626ZM 1.6626 0.5C 2.30468 0.5 2.8252 1.02051 2.8252 1.6626L 3.8252 1.6626C 3.8252 0.468228 2.85697 -0.5 1.6626 -0.5L 1.6626 0.5Z" transform="translate(1599.26 -922.757)"></path></g><g id="Ellipse 7"><path id="path1_stroke" d="M 2.8252 1.6626C 2.8252 2.30468 2.30468 2.8252 1.6626 2.8252L 1.6626 3.8252C 2.85697 3.8252 3.8252 2.85697 3.8252 1.6626L 2.8252 1.6626ZM 1.6626 2.8252C 1.02051 2.8252 0.5 2.30468 0.5 1.6626L -0.5 1.6626C -0.5 2.85697 0.468228 3.8252 1.6626 3.8252L 1.6626 2.8252ZM 0.5 1.6626C 0.5 1.02051 1.02051 0.5 1.6626 0.5L 1.6626 -0.5C 0.468228 -0.5 -0.5 0.468228 -0.5 1.6626L 0.5 1.6626ZM 1.6626 0.5C 2.30468 0.5 2.8252 1.02051 2.8252 1.6626L 3.8252 1.6626C 3.8252 0.468228 2.85697 -0.5 1.6626 -0.5L 1.6626 0.5Z" transform="translate(1606.32 -922.757)"></path></g></g></g></svg>' | ||
export default '<svg width="25" height="24" viewBox="0 0 25 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>Multiple Uses</title><desc>A test SVG file that has multiple <use> tags that reference the same <def>.</desc><g id="Canvas" transform="translate(-1592 941)"><g id="icon_cart_24x24"><g id="Vector 9"><path id="path0_stroke" d="M 0 -0.5C -0.276142 -0.5 -0.5 -0.276142 -0.5 0C -0.5 0.276142 -0.276142 0.5 0 0.5L 0 -0.5ZM 2.75 0L 3.21897 -0.173404C 3.14639 -0.369681 2.95927 -0.5 2.75 -0.5L 2.75 0ZM 18.1875 8.73145L 18.2435 9.2283C 18.4411 9.20601 18.6068 9.06873 18.6653 8.87867L 18.1875 8.73145ZM 19.9688 2.9502L 20.4466 3.09742C 20.4933 2.94575 20.4653 2.7809 20.371 2.65322C 20.2767 2.52554 20.1275 2.4502 19.9688 2.4502L 19.9688 2.9502ZM 3.84085 2.9502L 3.37188 3.1236C 3.37534 3.13293 3.37907 3.14217 3.38307 3.15128L 3.84085 2.9502ZM 17.2812 13.4814C 17.5574 13.4814 17.7812 13.2576 17.7812 12.9814C 17.7812 12.7053 17.5574 12.4814 17.2812 12.4814L 17.2812 13.4814ZM 6.15625 11.3955L 6.5793 11.662C 6.5839 11.6547 6.58831 11.6473 6.59253 11.6398L 6.15625 11.3955ZM 7.07031 12.9814L 7.07031 12.4814C 7.06374 12.4814 7.05716 12.4816 7.05059 12.4818L 7.07031 12.9814ZM 0 0.5L 2.75 0.5L 2.75 -0.5L 0 -0.5L 0 0.5ZM 6.99353 10.4969L 18.2435 9.2283L 18.1315 8.23459L 6.88147 9.50315L 6.99353 10.4969ZM 18.6653 8.87867L 20.4466 3.09742L 19.4909 2.80297L 17.7097 8.58422L 18.6653 8.87867ZM 2.28103 0.173404L 3.37188 3.1236L 4.30982 2.77679L 3.21897 -0.173404L 2.28103 0.173404ZM 3.38307 3.15128L 6.47972 10.2011L 7.39528 9.79892L 4.29864 2.74911L 3.38307 3.15128ZM 19.9688 2.4502L 3.84085 2.4502L 3.84085 3.4502L 19.9688 3.4502L 19.9688 2.4502ZM 6.50122 9.75575L 5.71997 11.1513L 6.59253 11.6398L 7.37378 10.2442L 6.50122 9.75575ZM 6.15625 11.3955C 5.7332 11.129 5.73312 11.1291 5.73304 11.1293C 5.73301 11.1293 5.73292 11.1294 5.73286 11.1295C 5.73279 11.1296 5.73261 11.1299 5.73247 11.1301C 5.73231 11.1304 5.7319 11.1311 5.73156 11.1316C 5.73111 11.1323 5.7301 11.134 5.7292 11.1354C 5.72784 11.1376 5.72512 11.1421 5.72246 11.1465C 5.71801 11.1539 5.71002 11.1674 5.70174 11.1819C 5.68698 11.2077 5.66268 11.2522 5.63834 11.3007C 5.59339 11.3911 5.52741 11.5428 5.48104 11.6975C 5.39788 11.9818 5.30821 12.528 5.71341 12.941L 6.42722 12.2407C 6.42617 12.2396 6.37946 12.1881 6.44083 11.9783C 6.46673 11.8859 6.4984 11.8165 6.53304 11.7474C 6.54851 11.7162 6.55948 11.6964 6.57005 11.6779C 6.57444 11.6702 6.57662 11.6665 6.57918 11.6623C 6.58003 11.6609 6.58003 11.6609 6.5805 11.6601C 6.58052 11.6601 6.58024 11.6605 6.58023 11.6605C 6.58033 11.6604 6.5798 11.6612 6.57985 11.6612C 6.57992 11.661 6.57955 11.6616 6.57959 11.6616C 6.57955 11.6616 6.57947 11.6617 6.57945 11.6618C 6.57937 11.6619 6.5793 11.662 6.15625 11.3955ZM 5.71341 12.941C 5.9979 13.2151 6.37595 13.3733 6.6104 13.4286C 6.7374 13.4571 6.86338 13.4723 6.93682 13.4775C 6.97793 13.4802 7.01743 13.4814 7.03908 13.4816C 7.05194 13.4817 7.06495 13.4816 7.07148 13.4815C 7.07572 13.4815 7.08043 13.4814 7.08255 13.4813C 7.08409 13.4813 7.08598 13.4812 7.08675 13.4812C 7.08737 13.4812 7.0882 13.4811 7.08851 13.4811C 7.08878 13.4811 7.08916 13.4811 7.0893 13.4811C 7.08943 13.4811 7.08961 13.4811 7.08967 13.4811C 7.08986 13.4811 7.09003 13.4811 7.07031 12.9814C 7.05059 12.4818 7.05077 12.4818 7.05094 12.4818C 7.05099 12.4818 7.05116 12.4818 7.05127 12.4818C 7.05117 12.4818 7.0521 12.4818 7.0519 12.4818C 7.05174 12.4818 7.05335 12.4817 7.05301 12.4817C 7.05282 12.4818 7.05505 12.4817 7.05464 12.4817C 7.05479 12.4817 7.05582 12.4817 7.05561 12.4817C 7.05325 12.4817 7.0531 12.4817 7.04893 12.4817C 7.03652 12.4816 7.02646 12.4814 7.00556 12.4798C 6.95498 12.4765 6.90713 12.4716 6.83491 12.4542C 6.67092 12.4178 6.54898 12.3806 6.42722 12.2407L 5.71341 12.941ZM 7.07031 13.4814L 17.2812 13.4814L 17.2812 12.4814L 7.07031 12.4814L 7.07031 13.4814Z" transform="translate(1593.45 -937.57)"></path></g><g id="Ellipse 8"><path id="path1_stroke" d="M 2.8252 1.6626C 2.8252 2.30468 2.30468 2.8252 1.6626 2.8252L 1.6626 3.8252C 2.85697 3.8252 3.8252 2.85697 3.8252 1.6626L 2.8252 1.6626ZM 1.6626 2.8252C 1.02051 2.8252 0.5 2.30468 0.5 1.6626L -0.5 1.6626C -0.5 2.85697 0.468228 3.8252 1.6626 3.8252L 1.6626 2.8252ZM 0.5 1.6626C 0.5 1.02051 1.02051 0.5 1.6626 0.5L 1.6626 -0.5C 0.468228 -0.5 -0.5 0.468228 -0.5 1.6626L 0.5 1.6626ZM 1.6626 0.5C 2.30468 0.5 2.8252 1.02051 2.8252 1.6626L 3.8252 1.6626C 3.8252 0.468228 2.85697 -0.5 1.6626 -0.5L 1.6626 0.5Z" transform="translate(1599.26 -922.757)"></path></g><g id="Ellipse 7"><path id="path1_stroke" d="M 2.8252 1.6626C 2.8252 2.30468 2.30468 2.8252 1.6626 2.8252L 1.6626 3.8252C 2.85697 3.8252 3.8252 2.85697 3.8252 1.6626L 2.8252 1.6626ZM 1.6626 2.8252C 1.02051 2.8252 0.5 2.30468 0.5 1.6626L -0.5 1.6626C -0.5 2.85697 0.468228 3.8252 1.6626 3.8252L 1.6626 2.8252ZM 0.5 1.6626C 0.5 1.02051 1.02051 0.5 1.6626 0.5L 1.6626 -0.5C 0.468228 -0.5 -0.5 0.468228 -0.5 1.6626L 0.5 1.6626ZM 1.6626 0.5C 2.30468 0.5 2.8252 1.02051 2.8252 1.6626L 3.8252 1.6626C 3.8252 0.468228 2.85697 -0.5 1.6626 -0.5L 1.6626 0.5Z" transform="translate(1606.32 -922.757)"></path></g></g></g></svg>' |
@@ -1,1 +0,1 @@ | ||
export default '<svg width="200" height="200" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>default_institution-logo</title><desc>Created using Figma</desc><g id="Canvas" transform="translate(-196 20)"><clippath id="clip-0" clip-rule="evenodd"><path d="M 196 -20L 396 -20L 396 180L 196 180L 196 -20Z" fill="#FFFFFF"></path></clippath><g id="default_institution-logo" clip-path="url(#clip-0)"><path d="M 196 -20L 396 -20L 396 180L 196 180L 196 -20Z" fill="#FFFFFF"></path><g id="Union"><path id="path0_fill" d="M 136.159 28.4327L 72.1413 0L 8.12361 28.4327L 8.12361 43.4437L 136.159 43.4437L 136.159 28.4327Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path><path id="path1_fill" d="M 129.801 115.497L 129.801 129.272L 144.283 129.272L 144.283 144.106L 0 144.106L 0 129.272L 14.4812 129.272L 14.4812 115.497L 129.801 115.497Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path><path id="path2_fill" d="M 36.6446 108.079L 22.8698 108.079L 22.8698 50.3311L 36.6446 50.3311L 36.6446 108.079Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path><path id="path3_fill" d="M 51.1258 108.079L 64.9007 108.079L 64.9007 50.3311L 51.1258 50.3311L 51.1258 108.079Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path><path id="path4_fill" d="M 93.1567 108.079L 79.3819 108.079L 79.3819 50.3311L 93.1567 50.3311L 93.1567 108.079Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path><path id="path5_fill" d="M 107.638 108.079L 121.413 108.079L 121.413 50.3311L 107.638 50.3311L 107.638 108.079Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path></g></g></g></svg>' | ||
export default '<svg width="200" height="200" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>Test SVG with No Description</title><desc></desc><g id="Canvas" transform="translate(-196 20)"><clippath id="clip-0" clip-rule="evenodd"><path d="M 196 -20L 396 -20L 396 180L 196 180L 196 -20Z" fill="#FFFFFF"></path></clippath><g id="default_institution-logo" clip-path="url(#clip-0)"><path d="M 196 -20L 396 -20L 396 180L 196 180L 196 -20Z" fill="#FFFFFF"></path><g id="Union"><path id="path0_fill" d="M 136.159 28.4327L 72.1413 0L 8.12361 28.4327L 8.12361 43.4437L 136.159 43.4437L 136.159 28.4327Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path><path id="path1_fill" d="M 129.801 115.497L 129.801 129.272L 144.283 129.272L 144.283 144.106L 0 144.106L 0 129.272L 14.4812 129.272L 14.4812 115.497L 129.801 115.497Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path><path id="path2_fill" d="M 36.6446 108.079L 22.8698 108.079L 22.8698 50.3311L 36.6446 50.3311L 36.6446 108.079Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path><path id="path3_fill" d="M 51.1258 108.079L 64.9007 108.079L 64.9007 50.3311L 51.1258 50.3311L 51.1258 108.079Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path><path id="path4_fill" d="M 93.1567 108.079L 79.3819 108.079L 79.3819 50.3311L 93.1567 50.3311L 93.1567 108.079Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path><path id="path5_fill" d="M 107.638 108.079L 121.413 108.079L 121.413 50.3311L 107.638 50.3311L 107.638 108.079Z" fill="#C4C4C4" transform="translate(223.859 7.94702)"></path></g></g></g></svg>' |
24074
12
216
78
4