From 33f407797213c56dd2f13e98228a5305efdf90fd Mon Sep 17 00:00:00 2001 From: xuatz Date: Mon, 3 Nov 2025 04:32:18 +0900 Subject: feat: display notes on bookmark card (#2083) * feat: display notes on bookmark card * apply styling * include mobile impl * apply pr comments * add display options menu into PR * put it under app setting * cleanup * address pr comments * change the default for show notes to false * make the in-card note font lighter --------- Co-authored-by: Mohamed Bassem --- apps/mobile/components/bookmarks/NotePreview.tsx | 83 ++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 apps/mobile/components/bookmarks/NotePreview.tsx (limited to 'apps/mobile/components/bookmarks/NotePreview.tsx') diff --git a/apps/mobile/components/bookmarks/NotePreview.tsx b/apps/mobile/components/bookmarks/NotePreview.tsx new file mode 100644 index 00000000..d529d56e --- /dev/null +++ b/apps/mobile/components/bookmarks/NotePreview.tsx @@ -0,0 +1,83 @@ +import { useState } from "react"; +import { Modal, Pressable, ScrollView, View } from "react-native"; +import { router } from "expo-router"; +import { ExternalLink, NotepadText, X } from "lucide-react-native"; +import { useColorScheme } from "nativewind"; + +import { Button } from "../ui/Button"; +import { Text } from "../ui/Text"; + +interface NotePreviewProps { + note: string; + bookmarkId: string; +} + +export function NotePreview({ note, bookmarkId }: NotePreviewProps) { + const [isModalVisible, setIsModalVisible] = useState(false); + const { colorScheme } = useColorScheme(); + const iconColor = colorScheme === "dark" ? "#9ca3af" : "#6b7280"; + const modalIconColor = colorScheme === "dark" ? "#d1d5db" : "#374151"; + + if (!note?.trim()) { + return null; + } + + return ( + <> + setIsModalVisible(true)}> + + + + {note} + + + + + setIsModalVisible(false)} + > + + + {/* Header */} + + Note + setIsModalVisible(false)} + className="p-2" + > + + + + + {/* Note Content */} + + + {note} + + + + {/* Action Button */} + + + + + + + + ); +} -- cgit v1.2.3-70-g09d2