Service card

This commit is contained in:
Eden Kirin
2024-01-24 22:43:12 +01:00
parent 490f2bdde6
commit d5374545f7
6 changed files with 57 additions and 12 deletions

View File

@ -1,7 +1,7 @@
import React from "react";
import { Service } from "../../types";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import Grid from "@mui/material/Unstable_Grid2";
import ServiceCard from "./ServiceCard";
interface ServiceListProps {
services: Service[];
@ -10,13 +10,15 @@ interface ServiceListProps {
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>
<Grid key={service.name} sx={{ display: "flex" }}>
<ServiceCard service={service} />
</Grid>
);
});
return <Box className="service-list">{serviceItems}</Box>;
return (
<Grid container rowSpacing={2} columnSpacing={2} className="service-list" sx={{ marginBottom: "1rem" }}>
{serviceItems}
</Grid>
);
}