Skip to content
Back to Components

TransactionDetailDrawer

@hua-labs/ui/advanced/dashboard
v1.0.0

bash
npm install @hua-labs/hua
tsx
import { TransactionDetailDrawer } from "@hua-labs/ui/advanced/dashboard";

Props

open*boolean-Drawer open state
onClose*() => void-Close handler
transactionTransactionDetail-Transaction detail information
metadataTransactionMetadataItem[][]Additional metadata items
settlementSettlementInfo-Settlement information
feesFeeBreakdown[][]Fee breakdown items
eventsTransactionEvent[][]Event log items
actionsReact.ReactNode-Footer action buttons
summaryReact.ReactNode-Custom summary component
loadingbooleanfalseLoading state
localestring"ko-KR"Locale for formatting
defaultCurrencystring"KRW"Default currency
emptyStateReact.ReactNode-Custom empty state when no transaction

TransactionDetail

id*string-Transaction ID
status*TransactionStatus-Transaction status
amount*number-Transaction amount
currencystring-Currency code
merchantstring-Merchant name
methodstring-Payment method
createdAtstring | Date-Created date
approvedAtstring | Date-Approved date
customerstring-Customer information
referencestring-Reference number

BasicTransactionDrawer.tsxtsx
import { useState } from "react";
import { TransactionDetailDrawer } from "@hua-labs/ui/advanced/dashboard";
import { Button } from "@hua-labs/ui";

export function BasicTransactionDrawer() {
  const [open, setOpen] = useState(false);

  return (
    <>
      <Button onClick={() => setOpen(true)}>
        View Transaction
      </Button>
      <TransactionDetailDrawer
        open={open}
        onClose={() => setOpen(false)}
        transaction={{
          id: "tx_123456",
          status: "approved",
          amount: 150000,
          currency: "KRW",
          merchant: "Test Merchant",
          method: "Credit Card",
          createdAt: new Date(),
          customer: "John Doe"
        }}
        metadata={[
          { label: "Transaction ID", value: "tx_123456", icon: "wallet" },
          { label: "Customer", value: "John Doe", icon: "user" }
        ]}
      />
    </>
  );
}