@arcblock/react-forge

0.9.0 • Public • Published

@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>

Package Sidebar

Install

npm i @arcblock/react-forge

Weekly Downloads

5

Version

0.9.0

License

Apache-2.0

Unpacked Size

49.1 kB

Total Files

9

Last publish

Collaborators

  • gxw
  • mave99a
  • polunzh
  • wangshijun