Skip to content

Commit 07094da

Browse files
committed
feat: empty row acts as divider
1 parent 4addd8b commit 07094da

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

plugins/info-cards/src/components/InfoRow.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
import type { InfoRowI } from "../typings";
2-
import { Box } from "@chakra-ui/react";
2+
import { Box, theme } from "@chakra-ui/react";
33
import InfoCard from "./InfoCard";
44

55
interface InfoRowProps {
66
infoRow: InfoRowI;
77
}
88
export default function InfoRow({ infoRow }: InfoRowProps): JSX.Element {
99
return (
10-
<Box display={"flex"} gap={4} width={"full"} justifyContent={"center"}>
10+
<Box
11+
display={"flex"}
12+
gap={4}
13+
width={"full"}
14+
justifyContent={"center"}
15+
style={
16+
infoRow.cards.length < 1
17+
? { height: "1px", backgroundColor: theme.colors.gray[100] }
18+
: {}
19+
}
20+
>
1121
{infoRow.cards.map((card) => (
1222
<InfoCard key={card.id} card={card} />
1323
))}

0 commit comments

Comments
 (0)