1.0.5 • Published 2 years ago
@rave-names/address-display v1.0.5
React Rave component
Install
$ yarn add @rave-names/address-display
# or
$ npm install @rave-names/address-display
Component parameters
Parameter | Description | Type |
---|---|---|
wallet | The wallet address to resolve | string |
imgProps | The props to use for the image, e.g. style, etc. | object |
textPropsAddress | Props to use when there is no resolved name | object |
textPropsName | Props to use when there is a resolved name | object |
Other | Any params will be passed to the button (like onClick, etc.) | any |
Examples
Example 1
import { Address } from '@rave-names/address-display';
function App() {
return <Address
wallet="0x3e522051a9b1958aa1e828ac24afba4a551df37d"
/>
}
Example 2
import { Address } from '@rave-names/address-display';
function AppWithInput(wallet) {
return <Address
wallet={wallet}
/>
}
Example 3
import { Address } from '@rave-names/address-display';
function AppWithStyles() {
return <Address wallet="0x3e522051a9b1958aa1e828ac24afba4a551df37d"
style={{
border: 'none',
background: '#272727',
color: '#FFF',
cursor: 'pointer',
borderRadius: '15px',
padding: '2vh 4vh',
fontFamily: 'Raleway',
fontSize: '21px',
}}
imgProps={{
style:{
borderRadius: '90px',
marginTop: '0vh',
height: '8vh'
}
}}
textPropsAddress={{}}
textPropsName={{
style:{
paddingTop: '2.5vh',
}
}}/>
}
Thanks for reading!
Made by the Rave team :)