From 9a25c8c19c8a3145b067c43b368df9618901f6b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Tue, 20 Feb 2024 19:01:41 +0100 Subject: [PATCH] Fix size of cards in table (#178) --- src/components/DocumentView/Table/ViewCards.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/DocumentView/Table/ViewCards.tsx b/src/components/DocumentView/Table/ViewCards.tsx index 7a045b85f..3f0b18724 100644 --- a/src/components/DocumentView/Table/ViewCards.tsx +++ b/src/components/DocumentView/Table/ViewCards.tsx @@ -16,10 +16,11 @@ export function ViewCards(props: TableViewProps) { 'md:max-w-3xl', 'inline-grid', 'gap-4', - + 'grid-cols-1', + 'min-[432px]:grid-cols-2', view.cardSize === 'large' - ? 'grid-cols-[repeat(auto-fit,_minmax(250px,_1fr))]' - : 'grid-cols-[repeat(auto-fit,_minmax(184px,_1fr))]', + ? 'md:grid-cols-2' + : 'md:grid-cols-3', block.data.fullWidth ? ['max-w-full', 'large:flex-column'] : null, )} >