From 9d5e8c194b27ca10df852f68ed067e950575dd9c Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 2 Oct 2025 23:32:32 +0200 Subject: [PATCH] feat(ui): add ContentPanel component to render readable HTML - Shows loading/empty states - Renders title and HTML via dangerouslySetInnerHTML - Minimal API for integration --- src/components/ContentPanel.tsx | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/components/ContentPanel.tsx diff --git a/src/components/ContentPanel.tsx b/src/components/ContentPanel.tsx new file mode 100644 index 00000000..1ee6f84f --- /dev/null +++ b/src/components/ContentPanel.tsx @@ -0,0 +1,43 @@ +import React from 'react' + +interface ContentPanelProps { + loading: boolean + title?: string + html?: string + selectedUrl?: string +} + +const ContentPanel: React.FC = ({ loading, title, html, selectedUrl }) => { + if (!selectedUrl) { + return ( +
+

Select a bookmark to preview its content.

+
+ ) + } + + if (loading) { + return ( +
+

Loading content…

+
+ ) + } + + return ( +
+ {title &&

{title}

} + {html ? ( +
+ ) : ( +
+

No readable content found for this URL.

+
+ )} +
+ ) +} + +export default ContentPanel + +