Skip to content

Commit 5e8015b

Browse files
Merge pull request #270 from threshold-network/detailed-link-item-fix
Update `DetailedLinkListItem` component Improve responsive styles for this component- show an ellipsis if there is not enough space to display the full text.
2 parents 2932ad4 + 3ea44bd commit 5e8015b

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
@@ -49,9 +49,11 @@ const DetailedLinkListItem: FC<DetailedLinkListItemProps> = ({
4949
spacing={0}
5050
my={{ base: "2", sm: undefined }}
5151
mr={{ sm: "auto !important" }}
52+
flex={1}
53+
minWidth="0"
5254
>
5355
<BodyLg sx={styles.title}>{title}</BodyLg>
54-
<BodySm sx={styles.subtitle}>{subtitle}</BodySm>
56+
<BodySm sx={styles.subTitle}>{subtitle}</BodySm>
5557
</Stack>
5658
{isExternal ? (
5759
<Link

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)