oddz-component-library
Oddz dex integration sample usage code is described below,
Props
Prop | Type | optional | description |
---|---|---|---|
dexInputValues | Object | required | set of input values that needs to passed from the dex while integratign , example: assetName: 'ETH',assetPrice: 3210,quantity: 1,provider: "ACCOUNT_ADDRESS"} |
onCloseModal | callBack | required | returns when the user hits 'X' on the modal |
onSuccess | callBack | required | returns to the DexUI after user completes flow |
theme | Object | optional | TDB: can provide a custom theme while integrating , defaulted to UI theme |
Install
npm install --save oddz-component-library
or
yarn add oddz-component-library
Usage
import React, { Component } from 'react'
import { ODDZModal } from 'oddz-component-library'
import 'oddz-component-library/dist/index.css'
class Example extends Component {
render() {
return (
<ODDZModal
theme={theme}
dexInputValues={dexInputValues}
onCloseModal={() => console.log('onClose')}
onSuccess={() => console.log('onSuccess')}
/>
)
}
}