vionex-pay-button

0.0.55 • Public • Published

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 ©

Readme

Keywords

none

Package Sidebar

Install

npm i vionex-pay-button

Weekly Downloads

1

Version

0.0.55

License

MIT

Unpacked Size

119 kB

Total Files

7

Last publish

Collaborators

  • muhammad-shahzaib