0.0.11 • Published 2 years ago

imx-widgets-react v0.0.11

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

imx-widgets-react

A collection of widgets for use with React apps for displaying data from Immutable X.

Installation

npm install imx-widgets-react

// or

yarn install imx-widgets-react

Widgets

Link Wallet

Opens the window to link your wallet with IMX.

Example of wallet linking widget

import { IMXLinkWallet } from 'imx-widgets-react';

<IMXLinkWallet
  // (optional) string: IMX Link URL, will default to mainnet
  imxLinkAddress=""
  // (optional) string: IMX API URL, will default to mainnet
  imxApiAddress=""
  // (optional) string: CSS class name for for the container that the button is in
  containerClassName=""
  // (optional) React.Component: Component that will be displayed when the wallet has been linked
  linkedComponent={<MyComponent />}
  // (optional) React.Component: Component that will be displayed when the wallet is not linked.
  unlinkedComponent={<MyComponent />}
/>

IMX Balance

Displays the linked wallets IMX balance.

NOTE: Requires the IMXLinkWidget to be used and for a wallet to have been linked before a balance will be displayed.

Example of balance widget

import { IMXBalance } from 'imx-widgets-react';

<IMXBalance
  imxLinkAddress="" // (optional) string: IMX Link URL, will default to mainnet
  imxApiAddress="" // (optional) string: IMX API URL, will default to mainnet
  />

IMX Deposit

Displays the linked wallets IMX balance and deposit funds to IMX.

NOTE: Requires the IMXLinkWidget to be used and for a wallet to have been linked before a balance will be displayed and funds can be deposited.

Example of deposit widget

import { IMXDeposit } from 'imx-widgets-react';

<IMXDeposit
  imxLinkAddress="" // (optional) string: IMX Link URL, will default to mainnet
  imxApiAddress="" // (optional) string: IMX API URL, will default to mainnet
  />
0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago