1.0.8 • Published 2 years ago

oddz-component-library v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

oddz-component-library

Oddz dex integration sample usage code is described below,

Props

PropTypeoptionaldescription
dexInputValuesObjectrequiredset of input values that needs to passed from the dex while integratign , example: assetName: 'ETH',assetPrice: 3210,quantity: 1,provider: "ACCOUNT_ADDRESS"}
onCloseModalcallBackrequiredreturns when the user hits 'X' on the modal
onSuccesscallBackrequiredreturns to the DexUI after user completes flow
themeObjectoptionalTDB: 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')}
      />
    )
  }
}

License

MIT ©https://github.com/oddz-finance/oddz-frontend