Improve account description overflow handling

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2023-07-14 23:19:21 +02:00
parent 0a2b07bea0
commit 48b39abc0c
3 changed files with 3 additions and 3 deletions

View file

@ -139,7 +139,7 @@ export const ProfileHoverCard: React.FC<IProfileHoverCard> = ({ visible = true }
) : null}
{account.note.length > 0 && (
<Text className='line-clamp-2' truncate size='sm' dangerouslySetInnerHTML={accountBio} />
<Text className='line-clamp-2 text-ellipsis [&_p:first-child]:block [&_p]:line-clamp-2 [&_p]:hidden [&_p]:truncate' truncate size='sm' dangerouslySetInnerHTML={accountBio} />
)}
</Stack>

View file

@ -36,7 +36,7 @@ const ScrollTopButton: React.FC<IScrollTopButton> = ({
const visible = count > 0 && scrolled;
const classes = clsx('fixed left-1/2 top-20 z-50 -translate-x-1/2', {
const classes = clsx('fixed left-1/2 top-2 z-50 -translate-x-1/2', {
'hidden': !visible,
});

View file

@ -57,7 +57,7 @@ const AccountCard: React.FC<IAccountCard> = ({ id }) => {
<Text
truncate
align='left'
className={clsx('line-clamp-2 [&_br]:hidden [&_p:first-child]:block [&_p]:hidden')}
className={clsx('line-clamp-2 [&_br]:hidden [&_p:first-child]:block [&_p]:hidden [&_p]:truncate')}
dangerouslySetInnerHTML={{ __html: account.note_emojified || '&nbsp;' }}
/>
</Stack>