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

0.16.1 • Public • Published

Icon >> Overview ||10

A web component for displaying icons.

import { html } from '@mdjs/mdjs-preview';
import { icons } from '@lion/icon';
import '@lion/icon/define';

icons.addIconResolver('lion', (iconset, name) => {
  switch (iconset) {
    case 'bugs':
      return import('./assets/iconset-bugs.js').then(module => module[name]);
    case 'space':
      return import('./assets/iconset-space.js').then(module => module[name]);
    case 'misc':
      return import('./assets/iconset-misc.js').then(module => module[name]);
    default:
      throw new Error(`Unknown iconset ${iconset}`);
  }
});
export const main = () => html`
  <lion-icon icon-id="lion:space:alienSpaceship" style="width: 50px; height: 50px;"></lion-icon>
`;

Installation

npm i --save @lion/icon
import { LionIcon } from '@lion/icon';
// or
import '@lion/icon/define';

Package Sidebar

Install

npm i @lion/icon

Weekly Downloads

526

Version

0.16.1

License

MIT

Unpacked Size

124 kB

Total Files

51

Last publish

Collaborators

  • tlouisse
  • narzac
  • d4kmor