vionex-pay-button
v0.0.55
Published
vionex wallet pay button
Downloads
12
Readme
vionex-pay-button
vionex wallet pay button
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