@devcapsule/deficon
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

DefIcon - 2.0.x

Website

https://keenlycode.github.io/deficon/

Usage

SVG Definitions to Icon Component for Web Application

// Javascript
import { DefIcon } from '@devcapsule/deficon';

class Icon extends DefIcon({
    url: './icon.svg'}) {};

customElements.define('el-icon', Icon);
<!-- html -->
<el-icon name="audio-speakers"></el-icon>

Using Mixin

Mixin is more flexible and can extends other HTMLElement Component.

// Javascript
import { DefIconMixin } from '@devcapsule/deficon';

class Icon extends DefIconMixin({url: './icon.svg'}, HTMLElement) {};

// The rest is the same.
customElements.define('el-icon', Icon);
// ...

Development

Environment Required

  • NodeJS
  • Python

Run Test

npm run test

Test in watch mode

npm run test-watch

Build documentation

npm run docs

Build distribution files

npm run dist

Readme

Keywords

Package Sidebar

Install

npm i @devcapsule/deficon

Weekly Downloads

18

Version

2.0.2

License

MIT

Unpacked Size

52.7 kB

Total Files

10

Last publish

Collaborators

  • nitipit