Limit lines of chapter names of ChapterCard

This commit is contained in:
schroda
2024-05-22 23:28:32 +02:00
parent 5cfa6d8445
commit 0ab6549a20

View File

@@ -28,6 +28,7 @@ import { DownloadType } from '@/lib/graphql/generated/graphql.ts';
import { TChapter } from '@/typings.ts'; import { TChapter } from '@/typings.ts';
import { ChapterActionMenuItems } from '@/components/chapter/ChapterActionMenuItems.tsx'; import { ChapterActionMenuItems } from '@/components/chapter/ChapterActionMenuItems.tsx';
import { Menu } from '@/components/menu/Menu.tsx'; import { Menu } from '@/components/menu/Menu.tsx';
import { TypographyMaxLines } from '@/components/atoms/TypographyMaxLines.tsx';
interface IProps { interface IProps {
chapter: TChapter; chapter: TChapter;
@@ -108,7 +109,7 @@ export const ChapterCard: React.FC<IProps> = (props: IProps) => {
}} }}
> >
<Stack direction="column" flex={1}> <Stack direction="column" flex={1}>
<Typography variant="h5" component="h2"> <TypographyMaxLines variant="h5" component="h2">
{chapter.isBookmarked && ( {chapter.isBookmarked && (
<BookmarkIcon <BookmarkIcon
color="primary" color="primary"
@@ -118,7 +119,7 @@ export const ChapterCard: React.FC<IProps> = (props: IProps) => {
{showChapterNumber {showChapterNumber
? `${t('chapter.title')} ${chapter.chapterNumber}` ? `${t('chapter.title')} ${chapter.chapterNumber}`
: chapter.name} : chapter.name}
</Typography> </TypographyMaxLines>
<Typography variant="caption">{chapter.scanlator}</Typography> <Typography variant="caption">{chapter.scanlator}</Typography>
<Typography variant="caption"> <Typography variant="caption">
{getDateString(Number(chapter.uploadDate ?? 0), true)} {getDateString(Number(chapter.uploadDate ?? 0), true)}