A collection of widgets for use with React apps for displaying data from Immutable X.
npm install imx-widgets-react
// or
yarn install imx-widgets-react
Opens the window to link your wallet with IMX.
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 />}
/>
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.
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
/>
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.
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
/>