Skip to content

Commit 89e90c1

Browse files
authored
Add fillWidth to the CardHorizontal items (#511)
* Add fillWidth to the CardHorizontal * Update the alignment for the horizontal card * Remove fillWidth prop
1 parent 974f7b1 commit 89e90c1

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/components/CardHorizontal/CardHorizontal.tsx

+8-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import { Icon, IconName } from "@/components";
44

55
type CardColor = "default" | "muted";
66

7-
export interface CardHorizontalProps extends HTMLAttributes<HTMLDivElement> {
8-
title?: string;
7+
export interface CardHorizontalProps
8+
extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
9+
title?: ReactNode;
910
icon?: IconName;
1011
disabled?: boolean;
1112
description?: ReactNode;
@@ -17,18 +18,19 @@ export interface CardHorizontalProps extends HTMLAttributes<HTMLDivElement> {
1718
const Header = styled.div`
1819
display: flex;
1920
flex-direction: column;
20-
align-items: center;
21-
width: fit-content;
21+
align-items: start;
22+
width: 100%;
2223
max-width: 100%;
2324
gap: inherit;
2425
`;
2526

2627
const Description = styled.div`
2728
display: flex;
2829
flex-direction: column;
29-
align-self: center;
30+
align-self: start;
3031
gap: ${({ theme }) => theme.click.card.horizontal.space.gap};
3132
flex: 1;
33+
width: 100%;
3234
`;
3335

3436
const Wrapper = styled.div<{
@@ -123,6 +125,7 @@ const CardIcon = styled(Icon)`
123125
const ContentWrapper = styled.div`
124126
display: flex;
125127
flex-direction: column;
128+
width: 100%;
126129
`;
127130

128131
export const CardHorizontal = ({

0 commit comments

Comments
 (0)