@chainberry/ui-components 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +31 -3
- package/dist/index.mjs +11988 -11966
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -414,7 +414,7 @@ declare const COINS_2: Coin_2[];
|
|
|
414
414
|
/** Withdrawable assets and the networks each can move over. */
|
|
415
415
|
declare const COINS_3: Coin_3[];
|
|
416
416
|
|
|
417
|
-
/**
|
|
417
|
+
/** The asset logo for a code, or undefined when we have no artwork for it. */
|
|
418
418
|
export declare function coinSrc(code: string): string | undefined;
|
|
419
419
|
|
|
420
420
|
export declare type Column<T> = {
|
|
@@ -627,6 +627,19 @@ export declare function CurrencyNetwork({ code, network, codeSrc, networkSrc, si
|
|
|
627
627
|
className?: string;
|
|
628
628
|
}): JSX.Element;
|
|
629
629
|
|
|
630
|
+
/** Which balance a row action was chosen on: the currency, plus the network
|
|
631
|
+
when it came from an expanded network row rather than the rolled-up
|
|
632
|
+
currency row. Enough for the host app to open a flow with the coin (and,
|
|
633
|
+
where it knows it, the network) already picked. */
|
|
634
|
+
export declare type CurrencyRowTarget = {
|
|
635
|
+
/** currency code, e.g. "USDT" */
|
|
636
|
+
code: string;
|
|
637
|
+
/** network code of the sub-row, e.g. "TRX" — absent on the currency row */
|
|
638
|
+
network?: string;
|
|
639
|
+
/** display name of that network, e.g. "Tron (TRC-20)" */
|
|
640
|
+
networkName?: string;
|
|
641
|
+
};
|
|
642
|
+
|
|
630
643
|
declare const DAILY_BALANCES: DailyBalance[];
|
|
631
644
|
|
|
632
645
|
/** One day in the daily-balances ledger. `null` figures render as an em dash. */
|
|
@@ -2396,17 +2409,32 @@ declare const WALLET_TIERS: {
|
|
|
2396
2409
|
|
|
2397
2410
|
export declare type WalletActionId = "withdraw" | "deposit" | "convert";
|
|
2398
2411
|
|
|
2399
|
-
export declare function WalletBalancesTable({ balances, actionsVariant, className, }: {
|
|
2412
|
+
export declare function WalletBalancesTable({ balances, actionsVariant, onRowAction, rowActions, actionLabels, className, }: {
|
|
2400
2413
|
balances: CurrencyBalance[];
|
|
2401
2414
|
actionsVariant?: "icons" | "menu";
|
|
2415
|
+
/** Fired when a row's action is chosen. Without it the menu still renders
|
|
2416
|
+
but does nothing — pass `rowActions={[]}` to drop it entirely. */
|
|
2417
|
+
onRowAction?: (action: WalletActionId, target: CurrencyRowTarget) => void;
|
|
2418
|
+
/** Which actions each row offers, in order. Defaults to all three; `[]`
|
|
2419
|
+
renders no actions column content (read-only view). */
|
|
2420
|
+
rowActions?: WalletActionId[];
|
|
2421
|
+
/** Translated action labels; unset keys fall back to English. */
|
|
2422
|
+
actionLabels?: Partial<Record<WalletActionId, string>>;
|
|
2402
2423
|
className?: string;
|
|
2403
2424
|
}): JSX.Element;
|
|
2404
2425
|
|
|
2405
|
-
export declare function WalletBalancesTableV2({ balances, actionsVariant, tierLabels, className, }: {
|
|
2426
|
+
export declare function WalletBalancesTableV2({ balances, actionsVariant, tierLabels, onRowAction, rowActions, actionLabels, className, }: {
|
|
2406
2427
|
balances: CurrencyBalance[];
|
|
2407
2428
|
actionsVariant?: "icons" | "menu";
|
|
2408
2429
|
/** Translated tier column headers; unset keys fall back to English. */
|
|
2409
2430
|
tierLabels?: Partial<Record<WalletTier, string>>;
|
|
2431
|
+
/** Fired when a row's action is chosen — see WalletBalancesTable. */
|
|
2432
|
+
onRowAction?: (action: WalletActionId, target: CurrencyRowTarget) => void;
|
|
2433
|
+
/** Which actions each row offers, in order. Defaults to all three; `[]`
|
|
2434
|
+
renders no actions column content (read-only view). */
|
|
2435
|
+
rowActions?: WalletActionId[];
|
|
2436
|
+
/** Translated action labels; unset keys fall back to English. */
|
|
2437
|
+
actionLabels?: Partial<Record<WalletActionId, string>>;
|
|
2410
2438
|
className?: string;
|
|
2411
2439
|
}): JSX.Element;
|
|
2412
2440
|
|