0.1.1 • Published 2 years ago
@tai-ui/svg-icons v0.1.1
UI System Icon (svg)
This package provides the UI System Icons as optimized plain svg assets.
Installation
npm install @tai-ui/svg-icons
Usage
webpack.js:
module.exports = {
resolve: {
extensions: [".svg"],
},
module: {
rules: [
{
test: /\.svg$/,
use: [
{
loader: "svg-inline-loader",
options: {
removeSVGTagAttrs: false,
},
},
],
}
]
}
};
Then reference an icon on a page.
Using template literal:
import AddIcon from "@tai-ui/svg-icons/icons/add_20_filled.svg";
`<div>${AddIcon}</div>`
Or require
:
var icon = require('@tai-ui/svg-icons/icons/add_20_filled.svg');
0.1.1
2 years ago