Socket
Socket
Sign inDemoInstall

@api3/logos

Package Overview
Dependencies
1
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @api3/logos

## Installation


Version published
Weekly downloads
554
increased by45.79%
Maintainers
5
Install size
1.20 MB
Created
Weekly downloads
 

Changelog

Source

0.1.11

Patch Changes

  • 8f98a89: Some changes have been made to the logos.

    | Logo | Name | Category | | ------------------------------------------------------------- | --------- | -------- | | <img src="./raw/chains/Chain1891.svg" width="36" alt=""> | 1891 | chain | | <img src="./raw/chains/Chain245022934.svg" width="36" alt=""> | 245022934 | chain | | <img src="./raw/chains/Chain245022926.svg" width="36" alt=""> | 245022926 | chain | | <img src="./raw/chains/Chain111.svg" width="36" alt=""> | 111 | chain |

Readme

Source

Getting started

Installation

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

Usage

React

import { ChainLogo, SymbolLogo, ApiProviderLogo } from '@api3/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 '@api3/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.

PropTypeDescription
idstringChain id
lightbooleanLight theme
PropTypeDescription
idstringSymbol id
lightbooleanLight theme
PropTypeDescription
idstringApiProvider
lightbooleanLight theme

Visit

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

Keywords

FAQs

Last updated on 26 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc