react-game-icons

React SVG elements for game-icons.net collection of icons

Usage no npm install needed!

<script type="module">
  import reactGameIcons from 'https://cdn.skypack.dev/react-game-icons';
</script>

README

react-game-icons

find 1x1 -mindepth 2 -type f -exec mv -iy '{}' svgs/ ';' rm -rf react mkdir react npx @svgr/cli --template template.js -d react svgs/ printf "import React from 'react';" > react/0000import.js cat react/* > paths.ts rm react/0000import.js printf "import React from 'react';\nimport * as paths from './paths';\n\nexport class SvgWrapper : (any) => React.FC = (Element) => (props : React.SVGProps) => <Element {...props} />;\n\n" > tmp000.js ls react/ | xargs -n 1 basename | cut -d. -f1 | awk {print "export const "$1" : React.FC = SvgWrapper(paths.Svg"$1");"}' > tmp001.js cat tmp*.js > index.ts rm tmp001.js rm tmp000.js


find a way to get rid of {..props} in paths

tsc -d --jsx react src/index.tsx