1.0.3 • Published 5 months ago

@ultron-wormhole/sdk-icons v1.0.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

Wormhole Icons

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

Installation

Basic

Install this package

npm install @ultron-wormhole/sdk-icons

Usage

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

import { Chain } from "@ultron-wormhole/sdk-base";
import { chainToIcon } from "@ultron-wormhole/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

1.0.3

5 months ago