Cleanup rendering of bookmark icon of ChapterCards
Gets rid of "position" and "top" usage
This commit is contained in:
@@ -83,12 +83,7 @@ export const ChapterCard: React.FC<IProps> = (props: IProps) => {
|
|||||||
<PopupState variant="popover" popupId="chapter-card-action-menu">
|
<PopupState variant="popover" popupId="chapter-card-action-menu">
|
||||||
{(popupState) => (
|
{(popupState) => (
|
||||||
<Stack sx={{ pt: 1, px: 1 }}>
|
<Stack sx={{ pt: 1, px: 1 }}>
|
||||||
<Card
|
<Card sx={{ touchCallout: 'none' }}>
|
||||||
sx={{
|
|
||||||
position: 'relative',
|
|
||||||
touchCallout: 'none',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<CardActionArea
|
<CardActionArea
|
||||||
component={Link}
|
component={Link}
|
||||||
to={`/manga/${chapter.manga.id}/chapter/${chapter.sourceOrder}`}
|
to={`/manga/${chapter.manga.id}/chapter/${chapter.sourceOrder}`}
|
||||||
@@ -108,17 +103,20 @@ export const ChapterCard: React.FC<IProps> = (props: IProps) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Stack direction="column" flex={1}>
|
<Stack direction="column" flex={1}>
|
||||||
<TypographyMaxLines variant="h5" component="h2">
|
<Stack
|
||||||
{chapter.isBookmarked && (
|
sx={{
|
||||||
<BookmarkIcon
|
flexDirection: 'row',
|
||||||
color="primary"
|
gap: 0.5,
|
||||||
sx={{ mr: 0.5, position: 'relative', top: '0.15em' }}
|
alignItems: 'center',
|
||||||
/>
|
}}
|
||||||
)}
|
>
|
||||||
{showChapterNumber
|
{chapter.isBookmarked && <BookmarkIcon color="primary" />}
|
||||||
? `${t('chapter.title')} ${chapter.chapterNumber}`
|
<TypographyMaxLines variant="h5" component="h2">
|
||||||
: chapter.name}
|
{showChapterNumber
|
||||||
</TypographyMaxLines>
|
? `${t('chapter.title')} ${chapter.chapterNumber}`
|
||||||
|
: chapter.name}
|
||||||
|
</TypographyMaxLines>
|
||||||
|
</Stack>
|
||||||
<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)}
|
||||||
|
|||||||
Reference in New Issue
Block a user