+
+
+ {title}
+
+ {children}
+
+
+ );
+};
+
+export {DashboardCard};
+
+export type {DashboardCardProps};
diff --git a/components/log-viewer-webui/client/src/components/StatCard/index.module.css b/components/log-viewer-webui/client/src/components/StatCard/index.module.css
index 1da71486d4..e69de29bb2 100644
--- a/components/log-viewer-webui/client/src/components/StatCard/index.module.css
+++ b/components/log-viewer-webui/client/src/components/StatCard/index.module.css
@@ -1,17 +0,0 @@
-.card :global(.ant-card-head) {
- border: 0px;
-}
-
-.cardContent {
- display: flex;
- flex-direction: column;
-}
-
-.title {
- font-size: 1.5rem;
- font-weight: 600;
-}
-
-.statistic {
- font-size: 5rem;
-}
diff --git a/components/log-viewer-webui/client/src/components/StatCard/index.tsx b/components/log-viewer-webui/client/src/components/StatCard/index.tsx
index 06ef738a92..4610c43946 100644
--- a/components/log-viewer-webui/client/src/components/StatCard/index.tsx
+++ b/components/log-viewer-webui/client/src/components/StatCard/index.tsx
@@ -1,9 +1,9 @@
-import {
- Card,
- Typography,
-} from "antd";
+import {Typography} from "antd";
-import styles from "./index.module.css";
+import {
+ DashboardCard,
+ DashboardCardProps,
+} from "../DashboardCard/index";
const {Text} = Typography;
@@ -11,43 +11,48 @@ const {Text} = Typography;
interface StatCardProps {
title: string;
stat: string;
- textColor?: string;
+ titleColor?: string;
backgroundColor?: string;
+ statSize?: string;
+ statColor?: string;
}
/**
- * Renders a card that dislays a statistic.
+ * Renders a card with a statistic.
*
* @param props
* @param props.title
* @param props.stat
- * @param props.textColor
+ * @param props.titleColor
* @param props.backgroundColor
+ * @param props.statSize
+ * @param props.statColor
* @return
*/
-const StatCard = ({title, stat, textColor, backgroundColor}: StatCardProps) => {
+const StatCard = ({
+ title,
+ stat,
+ titleColor,
+ backgroundColor,
+ statSize,
+ statColor,
+}: StatCardProps) => {
+ const props: DashboardCardProps = {
+ title,
+ ...(titleColor ?
+ {titleColor} :
+ {}),
+ ...(backgroundColor ?
+ {backgroundColor} :
+ {}),
+ };
+
return (
-