From f8cef28758a2b331a8acad499dfbd92e9794fcc5 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Thu, 29 Feb 2024 12:50:42 +0000
Subject: fix: Fix the look of the grid view and allowing notes to have
 variable size

---
 packages/web/app/dashboard/bookmarks/components/TextCard.tsx | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

(limited to 'packages/web/app/dashboard/bookmarks/components/TextCard.tsx')

diff --git a/packages/web/app/dashboard/bookmarks/components/TextCard.tsx b/packages/web/app/dashboard/bookmarks/components/TextCard.tsx
index 1d3fad3a..29d22352 100644
--- a/packages/web/app/dashboard/bookmarks/components/TextCard.tsx
+++ b/packages/web/app/dashboard/bookmarks/components/TextCard.tsx
@@ -32,8 +32,6 @@ export default function TextCard({
     throw new Error("Unexpected bookmark type");
   }
 
-  const numWords = bookmarkedText.text.split(" ").length;
-
   return (
     <>
       <BookmarkedTextViewer
@@ -45,15 +43,14 @@ export default function TextCard({
         className={cn(
           className,
           cn(
-            "flex flex-col gap-y-1 overflow-hidden rounded-lg p-2 shadow-md",
-            numWords > 12 ? "row-span-2 h-96" : "row-span-1 h-40",
+            "flex h-min max-h-96 flex-col gap-y-1 overflow-hidden rounded-lg p-2 shadow-md",
           ),
         )}
       >
         <Markdown className="prose grow overflow-hidden">
           {bookmarkedText.text}
         </Markdown>
-        <div className="flex flex-none flex-wrap gap-1 overflow-hidden">
+        <div className="mt-4 flex flex-none flex-wrap gap-1 overflow-hidden">
           <TagList bookmark={bookmark} />
         </div>
         <div className="flex w-full justify-between">
-- 
cgit v1.2.3-70-g09d2

