@wormhole-foundation/sdk-icons
v0.9.1Wormhole 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
npm i @wormhole-foundation/[email protected]
Metadata
- Apache-2.0
- Whatever
- Unknown
- released 8/7/2024