Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/components/StatCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { cn } from '@/utils/cn';

interface StatCardProps {
name: string;
total: number;
}

export default function StatCard({ name, total }: StatCardProps) {
return (
<div
className={cn(
'text-black-200 flex h-11 items-center justify-between rounded-md border border-gray-300 px-3.5 py-3.25 font-medium md:h-13 md:p-3.5 lg:h-22 lg:flex-col lg:items-start lg:gap-1',
)}
>
<div className={cn('text-md h-6 md:h-6.5 md:text-lg')}>{name}</div>
<div className={cn('flex h-8 items-baseline gap-1.5')}>
<span className={cn('text-xl font-bold md:text-2xl')}>{total}</span>
<p className={cn('text-md md:text-lg')}>건</p>
</div>
</div>
);
}
29 changes: 29 additions & 0 deletions src/mocks/statistics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export interface GetWorkSpaceStatistics {
success: boolean;
data: {
pendingCount: number;
totalCount: number;
rejectedCount: number;
totalAmount: number;
approvedCount: number;
};
meta: {
timestamp: string;
traceId: string;
};
}

export const mockStatistics: GetWorkSpaceStatistics = {
success: true,
data: {
pendingCount: 5,
totalCount: 20,
rejectedCount: 3,
totalAmount: 150000,
approvedCount: 12,
},
meta: {
timestamp: '2024-06-09T12:34:56Z',
traceId: 'abc123def456',
},
};
Loading