@arcblock/did-playground
v2.10.67
Published
React components that works with wallet-playground
Downloads
2,774
Readme
UI components that can be used in React Applications built on top of forge powered blockchain.
Usage
yarn add @arcblock/did-connect
Then:
import axios from 'axios';
import DidConnect from '@arcblock/did-connect/lib/Connect';
import DidAvatar from '@arcblock/did-connect/lib/Avatar';
import DidLogo from '@arcblock/did-connect/lib/Logo';
import DidAddress from '@arcblock/did-connect/lib/Address';
DidAuth
<DidConnect
action="login"
checkFn={axios.get}
onClose={() => handleOnClose()}
onSuccess={() => (window.location.href = '/profile')}
messages={{
title: 'login',
scan: 'Scan QR code with DID Wallet',
confirm: 'Confirm login on your DID Wallet',
success: 'You have successfully signed in!',
}}
webWalletUrl={webWalletUrl}
/>
DidAvatar
<DidAvatar did={userDid} size={256} />
DidLogo
<DidLogo size={32} />
DidAddress
<DidAddress did={userDid} size={32} />