2022-09-15 19:58:41 +03:00
|
|
|
import classNames from "classnames";
|
|
|
|
|
2023-09-03 10:05:25 -04:00
|
|
|
import { columnMap } from "../../utils/layout/columns";
|
2022-08-24 10:44:35 +03:00
|
|
|
|
2023-09-03 10:05:25 -04:00
|
|
|
import Item from "components/services/item";
|
2022-09-15 19:58:41 +03:00
|
|
|
|
2024-12-24 12:22:06 -08:00
|
|
|
export default function List({ groupName, services, layout, useEqualHeights, header }) {
|
2022-08-24 10:44:35 +03:00
|
|
|
return (
|
2022-09-15 19:58:41 +03:00
|
|
|
<ul
|
|
|
|
className={classNames(
|
|
|
|
layout?.style === "row" ? `grid ${columnMap[layout?.columns]} gap-x-2` : "flex flex-col",
|
2024-12-24 12:22:06 -08:00
|
|
|
header ? "mt-3" : "",
|
|
|
|
"services-list",
|
2022-09-15 19:58:41 +03:00
|
|
|
)}
|
|
|
|
>
|
2022-08-24 10:44:35 +03:00
|
|
|
{services.map((service) => (
|
2023-12-06 22:52:02 +00:00
|
|
|
<Item
|
2024-01-06 09:22:25 -08:00
|
|
|
key={[service.container, service.app, service.name].filter((s) => s).join("-")}
|
2023-12-06 22:52:02 +00:00
|
|
|
service={service}
|
2024-11-27 17:01:47 -08:00
|
|
|
groupName={groupName}
|
2023-12-06 22:52:02 +00:00
|
|
|
useEqualHeights={layout?.useEqualHeights ?? useEqualHeights}
|
|
|
|
/>
|
2022-08-24 10:44:35 +03:00
|
|
|
))}
|
|
|
|
</ul>
|
|
|
|
);
|
|
|
|
}
|