Open iegik opened 2 years ago
Implements #63
This makes ability to add Icons by their use:link in the SVG sprite
Usage:
// Sprite.tsx // eslint-disable-next-line import/no-webpack-loader-syntax import HomeIcon from '!!raw-loader!icons/home.svg'; // eslint-disable-next-line import/no-webpack-loader-syntax import DefaultAvatar from '!!raw-loader!icons/DefaultAvatar.svg'; // eslint-disable-next-line import/no-webpack-loader-syntax import PlusIcon from '!!raw-loader!icons/plus.svg'; const icons = { 'home': HomeIcon, 'DefaultAvatar': DefaultAvatar, 'plus': PlusIcon, };
/* somewhere in the app's page */ <Icon name="home" /> /* somewhere on App.tsx */ <Sprite />
Implements #63
This makes ability to add Icons by their use:link in the SVG sprite
Usage: