@bart-payment/react
v1.0.1
Published
Product component for bart users
Readme
@bart-payment/react
Product component for bart users.
Installation
To install the package, run: npm install @bart-payment/react
Usage
To use the ProductItem component, import it into your React application:
"use client";
import React from "react";
import ProductItem from "@bart-payment/react";
const ProductPage = () => {
const walletAddress = "Your_Wallet_Address_Here";
const mockItems = [
{
id: "nft-123",
name: "Limited Edition NFT",
description: "Exclusive digital collectible",
price: 10,
image: "/item.png",
tokenMint: "FSxJ85FXVsXSr51SeWf9ciJWTcRnqKFSmBgRDeL3KyWw",
tokenSymbol: "USDC",
},
];
return (
<div className="min-h-screen flex items-center justify-center">
<div className="flex flex-wrap gap-4 justify-center">
{mockItems.map((item) => (
<ProductItem
key={item.id}
item={item}
walletAddress={walletAddress}
productId={item.id}
userKey="Your_User_Key_Here"
/>
))}
</div>
</div>
);
};ProductItem Props
item: Product information object (required)walletAddress: User's Solana wallet address (required)productId: Unique identifier for the product (required)userKey: Your encoded user key from this dashboard (required)
License
This project is licensed under the ISC License.
