yearn-web-assets
/
1.0.4
yearn-web-assets 1.0.4
Install from the command line:
Learn more about npm packages
$ npm install @yearn/yearn-web-assets@1.0.4
Install via package.json:
"@yearn/yearn-web-assets": "1.0.4"
About this version
Tokens assets for the Yearns web projects.
This package is handled by Github's system. In order to be able to install it, first add the following to your .npmrc
or .yarnrc
file:
# For .npmrc
@yearn:registry=https://npm.pkg.github.com
# For .yarnrc
registry=https://npm.pkg.github.com/yearn
Then you can install is as usual:
yarn add @yearn/yearn-web-assets
import React, { Component, useState } from 'react'
import Token from 'yearn-web-tokens'
class Example extends Component {
render() {
return (
<Token
format={'svg'} //svg or img
address={'0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9'} // token address, checksummed
chainID={'42161'} // chain id
imgSize={'32'} // only if format is img, default is 128, can be 32 or 128
/>
)
}
}