From fd79f0696ece9ff3ee50680d609a6e1c02660542 Mon Sep 17 00:00:00 2001 From: Haider Alshamma Date: Fri, 6 Sep 2024 16:40:44 -0400 Subject: [PATCH] fix: refactor to use flexbox --- src/Card/CardSet.tsx | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/Card/CardSet.tsx b/src/Card/CardSet.tsx index ed5e39f0e..823acf647 100644 --- a/src/Card/CardSet.tsx +++ b/src/Card/CardSet.tsx @@ -1,19 +1,13 @@ -import React from "react"; import styled from "styled-components"; import { space } from "styled-system"; -import { Box } from "../Box"; -import { BoxProps } from "../Box/Box"; -import Card from "./Card"; +import { Flex } from "../Flex"; -const UnstyledCardSet = ({ children = [], ...props }: BoxProps) => {children}; - -const CardSet = styled(UnstyledCardSet)(space, ({ theme }) => ({ - [`${Card}`]: { - marginBottom: theme.space.x1, - "&:last-child": { - marginBottom: theme.space.none, - }, - }, -})); +const CardSet = styled(Flex)( + ({ theme }) => ({ + flexDirection: "column", + gap: theme.space.x1, + }), + space +); export default CardSet;