Skip to content

Commit 3ea44bd

Browse files
committed
Update DetailedLinkListItem component
Improve responsive styles for this component- show an ellipsis if there is not enough space to display the full text.
1 parent d8236f9 commit 3ea44bd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/components/DetailedLinkListItem/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ const DetailedLinkListItem: FC<DetailedLinkListItemProps> = ({
5050
spacing={0}
5151
my={{ base: "2", sm: undefined }}
5252
mr={{ sm: "auto !important" }}
53+
flex={1}
54+
minWidth="0"
5355
>
5456
<BodyLg sx={styles.title}>{title}</BodyLg>
55-
<BodySm sx={styles.subtitle}>{subtitle}</BodySm>
57+
<BodySm sx={styles.subTitle}>{subtitle}</BodySm>
5658
</Stack>
5759
{isExternal ? (
5860
<ExternalLink

src/theme/DetailedLinkListItem.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ const baseStyle: PartsStyleFunction<typeof parts> = (props) => {
3232
},
3333
subTitle: {
3434
color: mode("gray.500", "white")(props),
35+
whiteSpace: "nowrap",
36+
overflow: "hidden",
37+
textOverflow: "ellipsis",
3538
},
3639
link: {
3740
color: mode("gray.700", "white")(props),
41+
ml: { sm: "2" },
3842
},
3943
imageFallback: {
4044
w: "48px",

0 commit comments

Comments
 (0)