The weeb for the next gen discord boat - Wamellow
wamellow.com
bot
discord
1import { Skeleton } from "./ui/skeleton";
2
3export function Metrics({
4 children
5}: {
6 children: React.ReactNode;
7}) {
8 return (
9 <div className="md:ml-auto flex items-center gap-5 mt-6 md:mt-0">
10 {children}
11 </div>
12 );
13}
14
15export function MetricCard({
16 children,
17 name,
18 isLoading
19}: {
20 children: React.ReactNode;
21 name: string;
22 isLoading: boolean;
23}) {
24 return (
25 <div>
26 <div className="text-sm font-medium">
27 {name}
28 </div>
29 {isLoading
30 ? <Skeleton className="rounded-md mt-1.5 w-20 h-6 mb-1" />
31 : <span className="text-2xl dark:text-neutral-100 text-neutral-900 font-medium">
32 {children}
33 </span>
34 }
35 </div>
36 );
37}