Skip to content

keenlycode/deficon

Repository files navigation

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(HTMLElement, {url: './icon.svg'}) {};

// 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

About

SVG Definitions to Icon Component for Web Application

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors