Back to Components
A comprehensive table component for displaying transaction data with built-in status badges, amount formatting, date formatting, and row click interactions.
설치
Import
@hua-labs/ui의 UI 컴포넌트를 @hua-labs/hua에서 통합 제공합니다.
UI 컴포넌트, 모션 훅, i18n을 하나의 패키지로 사용할 수 있습니다.
Pro 컴포넌트입니다. Pro 라이선스가 필요합니다.
라이브 데모
기본 사용법
상태 유형
로딩 상태
빈 상태
Props
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
rows* | TransactionRow[] | - | Array of transaction data rows |
columns | TransactionColumnConfig[] | Default columns | Column configuration array |
isLoading | boolean | false | Show loading skeleton |
caption | React.ReactNode | - | Table caption |
filters | React.ReactNode | - | Filter components |
emptyState | React.ReactNode | - | Custom empty state component |
onRowClick | (row: TransactionRow) => void | - | 클릭 핸들러 |
highlightRow | (row: TransactionRow) => boolean | - | Row highlight condition function |
statusLabels | Partial<Record<TransactionStatus, string>> | - | Custom status labels |
locale | string | "ko-KR" | Locale for formatting |
defaultCurrency | string | "KRW" | Default currency |
footer | React.ReactNode | - | Footer content |
loadingRows | number | 5 | Number of skeleton rows when loading |
statusRenderer | (status: TransactionStatus, row: TransactionRow) => ReactNode | - | Custom status renderer |
amountFormatter | (row: TransactionRow) => ReactNode | - | Custom amount formatter |
methodFormatter | (row: TransactionRow) => ReactNode | - | Custom payment method formatter |
dateFormatter | (row: TransactionRow) => ReactNode | - | Custom date formatter |
rowActionLabel | (row: TransactionRow) => string | - | Custom row action button label |
rowActionHint | string | - | Tooltip hint for row action |
TransactionRow
Props
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
id* | string | - | Transaction ID |
merchant* | string | - | Merchant name |
amount* | number | - | Transaction amount |
currency | string | - | Currency code |
status* | "approved" | "pending" | "failed" | "refunded" | "cancelled" | "review" | - | Transaction status |
method | string | - | Payment method |
date* | string | Date | - | Transaction date |
customer | string | - | Customer information |
fee | number | - | Transaction fee |
reference | string | - | Reference number |