https://github.com/api3dao/logos
API3 logos package
https://github.com/api3dao/logos
Last synced: 4 months ago
JSON representation
API3 logos package
- Host: GitHub
- URL: https://github.com/api3dao/logos
- Owner: api3dao
- License: mit
- Created: 2023-11-24T14:57:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T23:25:32.000Z (about 1 year ago)
- Last Synced: 2025-04-12T20:06:11.282Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://api3dao.github.io/logos/
- Size: 8.12 MB
- Stars: 4
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Getting started
## Installation
```bash
pnpm add @api3/logos
npm i @api3/logos
yarn add @api3/logos
```
## Usage
### React
```js
import { ChainLogo, SymbolLogo, ApiProviderLogo } from '@api3/logos';
;
```
### HTML
```html
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);
},
}
...
}
```
## API
`light` prop is optional and defaults to `false` (dark theme). `light = true` will return the light theme logo.
### ChainLogo
| Prop | Type | Description |
| ----- | ------- | ----------- |
| id | string | Chain id |
| light | boolean | Light theme |
### SymbolLogo
| Prop | Type | Description |
| ----- | ------- | ----------- |
| id | string | Symbol id |
| light | boolean | Light theme |
### ApiProviderLogo
| Prop | Type | Description |
| ----- | ------- | ----------- |
| id | string | ApiProvider |
| light | boolean | Light theme |
## Visit
Live demo at [https://api3dao.github.io/logos](https://api3dao.github.io/logos)