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; readOnly?: boolean; } export function NotePreview({ note, bookmarkId, readOnly = false, }: 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 */} {!readOnly && ( )} ); }