1.0.5 • Published 2 years ago

@rave-names/address-display v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

React Rave component

image 1

Install

$ yarn add @rave-names/address-display
# or
$ npm install @rave-names/address-display

Component parameters

ParameterDescriptionType
walletThe wallet address to resolvestring
imgPropsThe props to use for the image, e.g. style, etc.object
textPropsAddressProps to use when there is no resolved nameobject
textPropsNameProps to use when there is a resolved nameobject
OtherAny 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 :)