Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 1ffdcae

Browse files
committed
fix: use correct height for badge
1 parent b79254c commit 1ffdcae

File tree

5 files changed

+28
-16
lines changed

5 files changed

+28
-16
lines changed

src/components/addManga/steps/reviewStep.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
ActionIcon,
33
Badge,
4+
Box,
45
createStyles,
56
Divider,
67
Grid,
@@ -188,7 +189,7 @@ export function ReviewStep({ form }: { form: UseFormReturnType<FormType> }) {
188189
<Tooltip label={genre} key={genre}>
189190
<div style={{ maxWidth: 100 }}>
190191
<Badge color="indigo" variant="light" size="xs" fullWidth>
191-
{genre}
192+
<Box className="h-3">{genre}</Box>
192193
</Badge>
193194
</div>
194195
</Tooltip>
@@ -204,7 +205,7 @@ export function ReviewStep({ form }: { form: UseFormReturnType<FormType> }) {
204205
<Tooltip label={tag} key={tag}>
205206
<div style={{ maxWidth: 100 }}>
206207
<Badge color="violet" variant="light" size="xs" fullWidth>
207-
{tag}
208+
<Box className="h-3">{tag}</Box>
208209
</Badge>
209210
</div>
210211
</Tooltip>

src/components/mangaCard.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ActionIcon, Badge, createStyles, Paper, Skeleton, Title, Tooltip } from '@mantine/core';
1+
import { ActionIcon, Badge, Box, createStyles, Paper, Skeleton, Title, Tooltip } from '@mantine/core';
22
import { Prisma } from '@prisma/client';
33
import { IconEdit, IconExclamationMark, IconRefresh, IconX } from '@tabler/icons-react';
44
import { contrastColor } from 'contrast-color';
@@ -214,7 +214,7 @@ export function MangaCard({ manga, onRemove, onUpdate, onRefresh, onClick }: Man
214214
className={classes.badge}
215215
size="xs"
216216
>
217-
{manga.source}
217+
<Box className="h-3">{manga.source}</Box>
218218
</Badge>
219219
<Title order={5} className={classes.title}>
220220
{manga.title}

src/components/mangaDetail.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Badge, createStyles, Divider, Grid, Group, Image, Spoiler, Text, Title } from '@mantine/core';
1+
import { Badge, Box, createStyles, Divider, Grid, Group, Image, Spoiler, Text, Title } from '@mantine/core';
22
import { NextLink } from '@mantine/next';
33
import { Prisma } from '@prisma/client';
44
import { IconExternalLink } from '@tabler/icons-react';
@@ -97,7 +97,7 @@ export function MangaDetail({ manga }: { manga: MangaWithMetadataAndChapters })
9797
<Group spacing={0}>
9898
{manga.metadata.synonyms.map((synonym) => (
9999
<Badge key={synonym} color="gray" variant="filled" size="xs" m={2}>
100-
{synonym}
100+
<Box className="h-3">{synonym}</Box>
101101
</Badge>
102102
))}
103103
</Group>
@@ -110,7 +110,7 @@ export function MangaDetail({ manga }: { manga: MangaWithMetadataAndChapters })
110110
>
111111
Checking{' '}
112112
<Badge component="span" color="blue" variant="filled" size="xs">
113-
{getCronLabel(manga.interval)}
113+
<Box className="h-3">{getCronLabel(manga.interval)}</Box>
114114
</Badge>{' '}
115115
from{' '}
116116
<Badge
@@ -120,7 +120,7 @@ export function MangaDetail({ manga }: { manga: MangaWithMetadataAndChapters })
120120
size="xs"
121121
sx={{ backgroundColor: stc(manga.source), color: contrastColor({ bgColor: stc(manga.source) }) }}
122122
>
123-
{manga.source}
123+
<Box className="h-3">{manga.source}</Box>
124124
</Badge>
125125
</Group>
126126
<Divider sx={{ fontWeight: 'bolder' }} variant="dashed" my="xs" label="Status" />
@@ -134,15 +134,15 @@ export function MangaDetail({ manga }: { manga: MangaWithMetadataAndChapters })
134134
<Group spacing={0}>
135135
{manga.metadata.genres.map((genre) => (
136136
<Badge key={genre} color="indigo" variant="light" size="xs" m={2}>
137-
{genre}
137+
<Box className="h-3">{genre}</Box>
138138
</Badge>
139139
))}
140140
</Group>
141141
<Divider sx={{ fontWeight: 'bolder' }} variant="dashed" my="xs" label="Tags" />
142142
<Group spacing={0}>
143143
{manga.metadata.tags.map((tag) => (
144144
<Badge key={tag} color="violet" variant="light" size="xs" m={2}>
145-
{tag}
145+
<Box className="h-3">{tag}</Box>
146146
</Badge>
147147
))}
148148
</Group>

src/components/navbar.tsx

+14-4
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,22 @@ function HistoryItem({ chapter }: { chapter: HistoryItemType }) {
132132
</Text>
133133
<SimpleGrid cols={2} mt={4}>
134134
<Tooltip label={time}>
135-
<Badge variant="light" size="xs" color="cyan" leftSection={<IconClock size={12} />}>
136-
{time}
135+
<Badge
136+
variant="light"
137+
size="xs"
138+
color="cyan"
139+
leftSection={<IconClock className="flex justify-center align-middle" size={12} />}
140+
>
141+
<Box className="h-3">{time}</Box>
137142
</Badge>
138143
</Tooltip>
139-
<Badge variant="light" size="xs" color="violet" leftSection={<IconFileReport size={12} />}>
140-
{prettyBytes(chapter.size)}
144+
<Badge
145+
variant="light"
146+
size="xs"
147+
color="violet"
148+
leftSection={<IconFileReport className="flex justify-center align-middle" size={12} />}
149+
>
150+
<Box className="h-3">{prettyBytes(chapter.size)}</Box>
141151
</Badge>
142152
</SimpleGrid>
143153
</>

src/components/updateManga.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
ActionIcon,
33
Badge,
4+
Box,
45
Button,
56
Code,
67
createStyles,
@@ -290,7 +291,7 @@ function UpdateModalContent({
290291
<Tooltip label={genre} key={genre}>
291292
<div style={{ maxWidth: 100 }}>
292293
<Badge color="indigo" variant="light" size="xs" fullWidth>
293-
{genre}
294+
<Box className="h-3">{genre}</Box>
294295
</Badge>
295296
</div>
296297
</Tooltip>
@@ -306,7 +307,7 @@ function UpdateModalContent({
306307
<Tooltip label={tag} key={tag}>
307308
<div style={{ maxWidth: 100 }}>
308309
<Badge color="violet" variant="light" size="xs" fullWidth>
309-
{tag}
310+
<Box className="h-3">{tag}</Box>
310311
</Badge>
311312
</div>
312313
</Tooltip>

0 commit comments

Comments
 (0)