Fix breaking on author styles
This commit is contained in:
@ -70,14 +70,16 @@ export const DescriptionStyle = {
|
||||
|
||||
export const AuthorInfoStyle = {
|
||||
maxLines: '1',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
maxWidth: '240px',
|
||||
color: '$thNotebookSubtle',
|
||||
fontSize: '12px',
|
||||
fontWeight: '400',
|
||||
fontFamily: '$display',
|
||||
lineHeight: '1',
|
||||
wordWrap: 'break-word',
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
}
|
||||
|
||||
export const timeAgo = (date: string | undefined): string => {
|
||||
|
||||
@ -249,7 +249,7 @@ const LibraryGridCardContent = (props: LinkedItemCardProps): JSX.Element => {
|
||||
>
|
||||
{props.item.author}
|
||||
{props.item.author && originText && ' | '}
|
||||
<SpanBox css={{ textDecoration: 'underline' }}>{originText}</SpanBox>
|
||||
{originText}
|
||||
</SpanBox>
|
||||
|
||||
<HStack
|
||||
|
||||
@ -279,19 +279,16 @@ export function LibraryListCardContent(
|
||||
<LibraryItemMetadata item={props.item} showProgress={true} />
|
||||
</HStack>
|
||||
|
||||
<Box css={{ ...TitleStyle, width: '80%' }}>{props.item.title}</Box>
|
||||
<Box css={{ ...TitleStyle }}>{props.item.title}</Box>
|
||||
{(props.item.author?.length ?? 0 + originText.length) > 0 && (
|
||||
<SpanBox
|
||||
css={{
|
||||
...AuthorInfoStyle,
|
||||
maxWidth: '90%',
|
||||
}}
|
||||
>
|
||||
{props.item.author}
|
||||
{props.item.author && originText && ' | '}
|
||||
<SpanBox css={{ textDecoration: 'underline' }}>
|
||||
{originText}
|
||||
</SpanBox>
|
||||
{originText}
|
||||
</SpanBox>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user