IdentityBadge
Last updated
Last updated
A component to get the Ethereum Identicon, an image that identifies Ethereum Accounts.
badgeOnly
TYPE | DEFAULT VALUE |
---|---|
|
|
Disables the badge as a button and avoids prompting the popover on click.
compact
TYPE | DEFAULT VALUE |
---|---|
|
|
Smaller version of the IdentityBadge. Should be used when the IdentityBadge is placed inline with text.
connectedAccount
TYPE | DEFAULT VALUE |
---|---|
|
|
If the given, assumes entity
is the same as the connected account and renders "you" in the popover.
entity
TYPE | DEFAULT VALUE |
---|---|
|
|
The Ethereum entity. If the given string is a valid Ethereum address (also based on the checksum, if provided (more info)[https://web3js.readthedocs.io/en/1.0/web3-utils.html#isaddress]), an Identicon will be automatically displayed.
label
TYPE | DEFAULT VALUE |
---|---|
| None |
A label for the entity
. If available, label
is displayed instead of the entity
on the badge.
labelStyle
TYPE | DEFAULT VALUE |
---|---|
| None |
Styles to apply to the label
.
networkType
TYPE | DEFAULT VALUE |
---|---|
|
|
Checks the type of network to get an Etherscan URL from the entity
.
popoverTitle
TYPE | DEFAULT VALUE |
---|---|
|
|
The title of the popover. You can pass anything that can be rendered, such as a num, string, DOM element, an array of them, or React fragments that contain them.
popoverAction
TYPE | DEFAULT VALUE |
---|---|
| None |
The action of the popover
popoverAction.label
The node rendered in the popover's action button.
popoverAction.onClick
The onclick handler for the popover's action button.
shorten
TYPE | DEFAULT VALUE |
---|---|
|
|
If true and entity
is a valid address, reduces entity
to only the first and last four characters (excluding the "0x" prefix) for display. i.e: address="0xcafe…5f2C"