Skip to content

Commit

Permalink
[PAY-3525] Fix text overflow (#10072)
Browse files Browse the repository at this point in the history
  • Loading branch information
faridsalau authored Oct 16, 2024
1 parent ddd3f94 commit 2b0c76c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion packages/harmony/src/components/text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ export const Text = forwardRef(
],
// @ts-ignore
fontWeight: typography.weight[variantConfig.fontWeight[strength]],
...('css' in variantConfig && variantConfig.css)
...('css' in variantConfig && variantConfig.css),
...(lineHeight === 'multi' && {
wordBreak: 'break-word',
hyphens: 'auto'
})
}),
...(shadow && {
textShadow: typography.shadow[shadow]
Expand Down
5 changes: 0 additions & 5 deletions packages/web/src/components/track/GiantTrackTile.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@
margin-left: var(--harmony-unit-1);
}

.description {
padding-top: var(--harmony-unit-3);
line-height: 26px;
}

.verified {
margin-left: var(--harmony-unit-2);
display: inline-block;
Expand Down
7 changes: 6 additions & 1 deletion packages/web/src/components/track/GiantTrackTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,12 @@ export const GiantTrackTile = ({
>
<TrackMetadataList trackId={trackId} />
{description ? (
<UserGeneratedText tag='h3' size='s' className={styles.description}>
<UserGeneratedText
tag='h3'
size='s'
lineHeight='multi'
css={(theme) => ({ paddingTop: theme.spacing.m })}
>
{description}
</UserGeneratedText>
) : null}
Expand Down

0 comments on commit 2b0c76c

Please sign in to comment.