zigap-utils
  • zigap-utils
    • Intro
  • components
    • LoginQR
    • AddressProvideQR
    • Payment QR (Send)
  • HOOKS
    • useZigap
Powered by GitBook
On this page
  • Props
  • Optional Props (only for styles)
  • Example
  1. components

AddressProvideQR

AddressProvideQR is a component where ZIGAP delivers addresses to dApp without verification procedures.

Props

prop
type
description

dapp

string

Name of the dApp to use

url

string

The url of dApp to connect

availableNetworks

string[]

List of connectable networks in dApp

validSeconds

number

QR code valid seconds

onReceive

(value) => void

Function called after login request

icon

string

Your dapp icon url to be displayed on zigap app

Optional Props (only for styles)

prop
type
default value
description

size

number

128

canvas width

bgColor

string

#fff

background color

fgColor

string

#000

foreground color

style

CSSProperties

custom css style

isShowLogo

boolean

false

Zigap logo in the middle of the QR code

logoSize

number

30

logo width & height

Example

import { LoginQR } from 'zigap-utils';

const App = () => {
  ...
  return (
    <div>
      <AddressProvideQR
        dapp='yourDappName'
        url='http://sample.yours.com'
        availableNetworks={['xphere']}
        validSeconds={600}
        icon='http://sample.icon-url.com'
        onReceive={({ isSuccess })=>{
          if(isSuccess) {
            // something to do after success
          }
        }}
      />
    </div>
  );
}

PreviousLoginQRNextPayment QR (Send)

Last updated 11 months ago