Skip to content
Snippets Groups Projects
BasicStatistics.js 1.49 KiB
Newer Older
import {Grid, Paper, Typography} from "@mui/material";
Emily Nicole Adams's avatar
Emily Nicole Adams committed
    //make json object here with fake info
    let stats = [
        {
            id: 1,
            name: "Total Enrollment",
            value: "50"
        }, {
            id: 2,
            name: "Percentage Passing",
            value: "88%"
        }, {
            id: 3,
            name: "Percentage Active Users",
            value: "90%"
        }
    ];

        <Grid sx={{ flexGrow: 1, padding: 40 + 'px'}} container spacing={2}>
            <Grid item xs={12}>
                <Grid container justifyContent="center" spacing={5}>
                    { stats.map((stat) => (
                        <Grid key={stat.id} item>
                                    display: "flex",
                                    flexDirection:"column",
                                    alignItems: "center",
                                    justifyContent:"center"
                                <Typography variant="h3">{stat.value}</Typography>
                                {stat.name}