0.0.4 • Published 2 years ago
@anima.org/db-widgt v0.0.4
Darkblock.io React Component Library
Getting Started 🚀
Install Darkblock's React Component Library using yarn
or npm
yarn add @darkblock.io/darkblock-widget
npm i @darkblock.io/darkblock-widget --save
Once the library is installed, import or require components into your codebase
import "@iproov/web"
require("@iproov/web")
Solana Widget Component
Input
- tokenId: id of the NFT in Solana
- wallets: array of
@solana/wallet-adapter-wallets
Examlple
This component needs to be used within the scope of the Solana Wallet Adapter component like in the following example:
import {SolanaDarkblockWidget} from "@darkblock.io/darkblockwidgets"
const Main = () => {
...
return (
<ConnectionProvider endpoint={endpoint}>
<WalletProvider wallets={wallets} autoConnect>
<WalletModalProvider>
<WalletMultiButton />
<SolanaDarkblockWidget
tokenId="PgYulnWM90pi2oc3MpG31yvUHoWhSog17jTbjKYRjEJ"
wallets={wallets}
/>
</WalletModalProvider>
</WalletProvider>
</ConnectionProvider>
)
}
export default Main