diff --git a/src/app/components/PersonalBalance/PersonalBalance.tsx b/src/app/components/PersonalBalance/PersonalBalance.tsx
index 128a3f19..333456bb 100644
--- a/src/app/components/PersonalBalance/PersonalBalance.tsx
+++ b/src/app/components/PersonalBalance/PersonalBalance.tsx
@@ -21,7 +21,15 @@ export function PersonalBalance() {
-
+ {},
+ }}
+ />
);
diff --git a/src/app/components/Stats/ActionComponent.tsx b/src/app/components/Stats/ActionComponent.tsx
new file mode 100644
index 00000000..11042543
--- /dev/null
+++ b/src/app/components/Stats/ActionComponent.tsx
@@ -0,0 +1,19 @@
+import { Button, Loader } from "@babylonlabs-io/bbn-core-ui";
+
+interface ActionComponentProps {
+ title: string;
+ onAction: () => void;
+ awaitingResponse?: boolean;
+}
+
+export function ActionComponent({
+ title,
+ onAction,
+ awaitingResponse,
+}: ActionComponentProps) {
+ return (
+
+ );
+}
diff --git a/src/app/components/Stats/StatItem.tsx b/src/app/components/Stats/StatItem.tsx
index 12e8a97e..ba3c2e02 100644
--- a/src/app/components/Stats/StatItem.tsx
+++ b/src/app/components/Stats/StatItem.tsx
@@ -2,12 +2,18 @@ import { type JSX } from "react";
import { AiOutlineInfoCircle } from "react-icons/ai";
import { Tooltip } from "react-tooltip";
+import { ActionComponent } from "./ActionComponent";
+
interface StatItemProps {
loading?: boolean;
icon?: JSX.Element;
title: string;
value: string | number;
tooltip?: string;
+ actionComponent?: {
+ title: string;
+ onAction: () => void;
+ };
}
export const StatItem = ({
@@ -16,36 +22,45 @@ export const StatItem = ({
title,
value,
tooltip,
+ actionComponent,
}: StatItemProps) => (
-
-
- {icon}
-
-
{title}
- {tooltip && (
- <>
-
-
-
-
- >
- )}
+
+
+
+ {icon}
+
+
{title}
+ {tooltip && (
+ <>
+
+
+
+
+ >
+ )}
+
-
-
-
- {loading ? (
-
- ) : (
- {value}
- )}
-
+
+
+ {loading ? (
+
+ ) : (
+ {value}
+ )}
+
+
+ {actionComponent ? (
+
+ ) : null}
);