@kaffee/latte
v1.2.0
Published
> A based web component & svgo library, tree shaking support > Only TypeScript
Downloads
5
Readme
@kaffee/latte
A based web component & svgo library, tree shaking support Only TypeScript
Installation
Install with npm
npm install --dev @kaffee/latte
Install with yarn
yarn add --dev @kaffee/latte
Install with pnpm
pnpm add -D @kaffee/latte
Usage
Configuration file
{
"svg":"./src/icons/svg",
"dist":"./src/icons/latte",
"eslint":"quotes,unicorn/no-abusive-eslint-disable,prettier/prettier",
"namespace":true
}
Convert SVG to TypeScript
pnpm latte
Define Component
import { registerSvgIcon } from "@kaffee/latte";
import { bank_card, member, wallet } from "./icons/latte";
registerSvgIcon([bank_card, member, wallet]);
User SVG
<latte-svg
style="fill:red"
width="30px"
height="30px"
namespace="latte"
name="member"
/>