Fix styling for cards when no cover is defined (#2261)

This commit is contained in:
Samy Pessé
2024-04-02 23:10:59 +01:00
committed by GitHub
parent 5b7488b066
commit 36600bc0c7
@@ -33,10 +33,7 @@ export async function RecordCard(
'z-0',
'relative',
'grid',
'grid-cols-[40%,_1fr]',
'bg-light',
'min-[432px]:grid-cols-none',
'min-[432px]:grid-rows-[auto,1fr]',
'w-[calc(100%+2px)]',
'h-[calc(100%+2px)]',
'inset-[-1px]',
@@ -44,6 +41,14 @@ export async function RecordCard(
'straight-corners:rounded-none',
'overflow-hidden',
'dark:bg-dark',
cover
? [
// On mobile, the cover is displayed on the left with 40% of the width
'grid-cols-[40%,_1fr]',
'min-[432px]:grid-cols-none',
'min-[432px]:grid-rows-[auto,1fr]',
]
: null,
)}
>
{cover ? (