0.0.55 • Published 3 years ago

vionex-pay-button v0.0.55

Weekly downloads
34
License
MIT
Repository
-
Last release
3 years ago

vionex-pay-button

vionex wallet pay button

NPM JavaScript Style Guide

Install

npm install --save vionex-pay-button

Usage

import React, { Component } from 'react'
import PayButton from 'vionex-pay-button'
import 'vionex-pay-button/dist/index.css'

const App = () => {
  const getRes = (res) => {
    console.log('res  ', res)
  }

  const buttonLoad = () => {
    console.log('button loaded')
  }

  const onTransactionStart = () => {
    console.log('transction started')
  }

  const onError = (err) => {
    console.log('error occured', err)
  }

  const onSuccess = (res) => {
    console.log('success ', res)
  }

  return (
    <PayButton
      amount={[0.001]}
      to={['addressHere']}
      responseCallback={getRes}
      onLoad={buttonLoad}
      onTransactionStart={onTransactionStart}
      onError={onError}
      onSuccess={onSuccess}
    />
  )
  // or transfer tokens
  // return (
  //   <PayButton
  //     token={tokenId}
  //     amount={[1]}
  //     to={['publicKeyHere']}
  //     responseCallback={getRes}
  //   />
  // )
}

export default App

License

MIT ©

0.0.55

3 years ago

0.0.52

3 years ago

0.0.53

3 years ago

0.0.50

3 years ago

0.0.40

3 years ago

0.0.31

3 years ago

0.0.30

3 years ago

0.0.20

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.3

3 years ago

0.0.4

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago