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 + +