diff --git a/src/components/card-wrapper/simple-card.tsx b/src/components/card-wrapper/simple-card.tsx
index 224c4f86..e0c5e60e 100644
--- a/src/components/card-wrapper/simple-card.tsx
+++ b/src/components/card-wrapper/simple-card.tsx
@@ -8,8 +8,8 @@ const SimpleCardItemWrapper = styled.div`
align-items: center;
width: 100%;
height: 100%;
- gap: 10px;
- margin-bottom: 24px;
+ gap: 16px;
+ margin-bottom: 16px;
`;
const useStyles = createStyles(({ css, token }) => ({
@@ -24,12 +24,16 @@ const useStyles = createStyles(({ css, token }) => ({
justify-content: center;
align-items: center;
gap: ${token.padding}px;
+ &.bordered {
+ border: 1px solid ${token.colorBorder};
+ }
.title {
font-size: ${token.fontSize}px;
font-weight: var(--font-weight-medium);
}
.content {
- font-weight: var(--font-weight-500);
+ font-size: ${token.fontSize}px;
+ color: ${token.colorTextSecondary};
}
`
}));
@@ -37,13 +41,14 @@ export const SimpleCardItem: React.FC<{
title?: string;
content?: React.ReactNode;
style?: React.CSSProperties;
+ bordered?: boolean;
}> = (props) => {
- const { styles } = useStyles();
+ const { styles, cx } = useStyles();
- const { title, content, style } = props;
+ const { title, content, style, bordered } = props;
return (
-
+
@@ -53,8 +58,9 @@ export const SimpleCardItem: React.FC<{
export const SimpleCard: React.FC<{
dataList: { label: string; value: React.ReactNode }[];
height?: string | number;
+ bordered?: boolean;
}> = (props) => {
- const { dataList } = props;
+ const { dataList, bordered } = props;
return (
@@ -63,6 +69,7 @@ export const SimpleCard: React.FC<{
key={index}
title={item.label}
content={item.value}
+ bordered={bordered}
>
))}
diff --git a/src/pages/dashboard/components/usage-inner/index.tsx b/src/pages/dashboard/components/usage-inner/index.tsx
index 8ff0bfc9..948f324b 100644
--- a/src/pages/dashboard/components/usage-inner/index.tsx
+++ b/src/pages/dashboard/components/usage-inner/index.tsx
@@ -1,3 +1,4 @@
+import { SimpleCard } from '@/components/card-wrapper/simple-card';
import PageTools from '@/components/page-tools';
import { ExportOutlined } from '@ant-design/icons';
import { useIntl } from '@umijs/max';
@@ -18,10 +19,21 @@ const FilterWrapper = styled.div`
.selection {
display: flex;
align-items: center;
- gap: 8px;
+ gap: 12px;
}
`;
+const TitleWrapper = styled.div`
+ margin: 26px 0px;
+ font-weight: 700;
+`;
+
+const dataList = [
+ { label: '100M', value: 'Completion Tokens' },
+ { label: '50M', value: 'Prompt Tokens' },
+ { label: '120K', value: 'API Requests' }
+];
+
const UsageInner: FC<{ paddingRight: string }> = ({ paddingRight }) => {
const intl = useIntl();
@@ -40,14 +52,7 @@ const UsageInner: FC<{ paddingRight: string }> = ({ paddingRight }) => {
return (
-
- {intl.formatMessage({ id: 'dashboard.usage' })}
-
- }
- />
+
= ({ paddingRight }) => {
xl={16}
style={{ paddingRight: paddingRight }}
>
+
+ {intl.formatMessage({ id: 'dashboard.usage' })}
+
@@ -71,6 +79,11 @@ const UsageInner: FC<{ paddingRight: string }> = ({ paddingRight }) => {
{intl.formatMessage({ id: 'common.button.export' })}
+
= ({ paddingRight }) => {
>
+
+ {intl.formatMessage({ id: 'dashboard.topusers' })}
+
= (props) => {
>
*/}
-
+ {/* */}
= (props) => {
return (
-
+
);
};