JSPM

@spectrum-web-components/iconset

0.6.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11116
  • Score
    100M100P100Q147961F
  • License Apache-2.0

Package Exports

  • @spectrum-web-components/iconset
  • @spectrum-web-components/iconset/package.json
  • @spectrum-web-components/iconset/src/iconset-registry.d.ts
  • @spectrum-web-components/iconset/src/iconset-registry.js
  • @spectrum-web-components/iconset/src/iconset-registry.js.map
  • @spectrum-web-components/iconset/src/iconset-svg.d.ts
  • @spectrum-web-components/iconset/src/iconset-svg.js
  • @spectrum-web-components/iconset/src/iconset-svg.js.map
  • @spectrum-web-components/iconset/src/iconset.d.ts
  • @spectrum-web-components/iconset/src/iconset.js
  • @spectrum-web-components/iconset/src/iconset.js.map
  • @spectrum-web-components/iconset/src/index.d.ts
  • @spectrum-web-components/iconset/src/index.js
  • @spectrum-web-components/iconset/src/index.js.map

Readme

Description

Extend either the Iconset or IconsetSVG exports of this package to supply your application with a custom icon set to power the use of <sp-icon> elements throughout. Give your new icon set a custom name, and you'll be ready to supply them as <sp-icon name="custom-icons:icon"> across your application.

Usage

See it on NPM! How big is this package in your project?

yarn add @spectrum-web-components/iconset
import { TemplateResult } from 'lit-element';
import { IconsetSVG } from '@spectrum-web-components/iconset/src/iconset-svg.js';

import { CustomIconSet } from 'your-icon-set.js';

export class IconsLarge extends IconsetSVG {
    public constructor() {
        super();
        this.name = 'custom-icons'; // default iconset name for these icons
    }

    protected renderDefaultContent(): TemplateResult {
        return CustomIconSet;
    }
}