Files
pingator/src/components/dashboard/ServiceList.tsx
2024-01-24 21:58:39 +01:00

23 lines
654 B
TypeScript

import React from "react";
import { Service } from "../../types";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
interface ServiceListProps {
services: Service[];
}
export default function ServiceList({ services }: ServiceListProps) {
const serviceItems = services.map((service) => {
return (
<Box className="service-card">
<Typography component={"h1"} key={service.name} className="service-name">
{service.name}
</Typography>
</Box>
);
});
return <Box className="service-list">{serviceItems}</Box>;
}