2.11.1 • Published 1 month ago

@phase21/logos v2.11.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Getting started

Installation

pnpm add @phase21/logos
npm i @phase21/logos
yarn add @phase21/logos

Usage

React

import { ChainLogo, SymbolLogo, ApiProviderLogo } from '@phase21/logos';

<div>
    <img src={ChainLogo('43114')} width={50} height={50} alt="43114" />
    <img src={SymbolLogo('BTC')} width={50} height={50} alt="BTC" />
    <img src={ApiProviderLogo('nodary')} width={50} height={50} alt="nodary" />
</div>;

HTML

<template>
    <div>
        <img src={ChainLogo('43114')} width={50} height={50} alt='43114' />
        <img src={SymbolLogo('BTC')} width={50} height={50} alt='BTC' />
        <img src={ApiProviderLogo('nodary')} width={50} height={50} alt='nodary' />
    </div>
</template>

<script>
import { ChainLogo, SymbolLogo, ApiProviderLogo } from '@phase21/logos';

export default {
...
methods: {
    getSymbolLogo(symbol) {
      return SymbolLogo(symbol);
    },
    getChainLogo(chainId) {
      return ChainLogo(chainId);
    },
    getApiProviderLogo(apiProvider) {
      return ApiProviderLogo(apiProvider);
    },
}
...
}
</script>

API

light prop is optional and defaults to false (dark theme). light = true will return the light theme logo.

ChainLogo

PropTypeDescription
idstringChain id
lightbooleanLight theme

SymbolLogo

PropTypeDescription
idstringSymbol id
lightbooleanLight theme

ApiProviderLogo

PropTypeDescription
idstringApiProvider
lightbooleanLight theme

Visit

Live demo at https://api3dao.github.io/logos

2.11.1

1 month ago

2.11.0

1 month ago

2.10.2

2 months ago

2.9.4

2 months ago

2.9.5

2 months ago

2.10.0

2 months ago

2.9.3

2 months ago

2.9.2

3 months ago

2.9.1

3 months ago

2.9.0

3 months ago

2.8.5

3 months ago

2.8.3

3 months ago

2.8.4

3 months ago

2.8.2

3 months ago

2.8.1

3 months ago

2.8.0

3 months ago

2.7.0

4 months ago

2.6.0

4 months ago

2.5.0

4 months ago

2.4.0

4 months ago

2.3.0

4 months ago

2.2.0

4 months ago

2.1.0

4 months ago

2.0.0

4 months ago