0.9.0 • Published 5 years ago
@arcblock/react-forge v0.9.0
@arcblock/react-forge
UI components that can be used in React Applications built on top of forge powered blockchain.
Usage
yarn add @arcblock/react-forge
Then:
import Auth from '@arcblock/react-forge/lib/Auth';
import UserAvatar from '@arcblock/react-forge/lib/Avatar';
import axios form 'axios';
<UserAvatar did={userDid} size={256} />
<Dialog open maxWidth="sm" disableBackdropClick disableEscapeKeyDown onClose={toggle}>
<Auth
action="login"
checkFn={axios.get}
onClose={() => toggle()}
onSuccess={() => (window.location.href = '/profile')}
messages={{
title: 'login',
scan: 'Scan QR code with ABT Wallet',
confirm: 'Confirm login on your ABT Wallet',
success: 'You have successfully signed in!',
}}
/>
</Dialog>