Package Exports
- wyre-widget
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wyre-widget) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Wyre Widget
New Version using Hooks and no side effects.
Demo first?
Install
npm i -S wyre-widget
Getting started
import React from 'react'
import Wyre from 'wyre-widget'
class App extends React.Component {
constructor (props) {
super(props)
this.state = {
open: false
}
}
render () {
return (
<Wyre
config={{
env: 'test',
accountId: 'AC-BAAA2222',
auth: {
type: 'secretKey',
secretKey: '6a6f7f9187f766f66938638f1afd79b20fb5989e2837e6f989'
},
operation: {
type: 'debitcard',
destCurrency: 'ETH',
destAmount: 0.01,
dest: '0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1'
},
style: {
primaryColor: '#0055ff'
}
}}
onReady={() => console.log('ready')}
onClose={event => console.log('close', event)}
onComplete={event => console.log('complete', event)}
open={this.state.open}>
<button onClick={() => this.setState({ open: true })}>
Buy ETH
</button>
</Wyre>
)
}
}
export default App
Please read the Wyre documentation for the configuration options.
Development
npm install
npm run build
npm run lint