@wormhole-foundation/sdk-icons
TypeScript icon, indicating that this package has built-in type declarations

0.6.8 • Public • Published

Wormhole Icons

This package contains icons for all of the Wormhole connected chains.

Installation

Basic

Install this package

npm install @wormhole-foundation/sdk-icons

Usage

Getting started is simple, just import Wormhole and the Platform modules you wish to support

import { Chain } from "@wormhole-foundation/sdk-base";
import { chainToIcon } from "@wormhole-foundation/sdk-icons";

function ChainIcon({chain}: {chain: Chain}) {
    const icon = chainToIcon(chain);
    return icon ? <img src={icon} alt={chain} height="32px" width="32px" /> : null
}

Development

SVGs for each chain should be included only once in src/images/chains and they should be minified using a tool like SVGOMG to reduce the overall bundle size.

When a new chain is added, the strict typing should enforce that this package must be updated. In most cases, this should be as simple as dropping the SVG in /src/images/chains and running npm run gen

Readme

Keywords

none

Package Sidebar

Install

npm i @wormhole-foundation/sdk-icons

Weekly Downloads

445

Version

0.6.8

License

Apache-2.0

Unpacked Size

220 kB

Total Files

27

Last publish

Collaborators

  • wormhole-ci
  • artursapek
  • barnjamin
  • tonyjin
  • kev1n-peters
  • evan-gray