File size: 685 Bytes
a61ba58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React from "react";
import { Box, Typography } from "@mui/material";

export const Metric = ({ icon, label, value, color = "default" }) => (
  <Box
    sx={{
      display: "flex",
      alignItems: "center",
      gap: 1,
      p: 0.75,
      borderRadius: 1,
      backgroundColor: "background.paper",
      border: 1,
      borderColor: "divider",
      minWidth: 180,
    }}
  >
    <Box sx={{ color: `${color}.main` }}>{icon}</Box>
    <Box>
      <Typography variant="caption" color="text.secondary">
        {label}
      </Typography>
      <Typography variant="body2" fontWeight="medium" color="text.primary">
        {value}
      </Typography>
    </Box>
  </Box>
);