Spaces:
Build error
Build error
Create src/components/grabber/Lightbox.tsx
#8
by launch-calcium - opened
src/components/grabber/Lightbox.tsx
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
| 2 |
+
|
| 3 |
+
export function Lightbox({ post, open, setOpen }: any) {
|
| 4 |
+
return (
|
| 5 |
+
<Dialog open={open} onOpenChange={setOpen}>
|
| 6 |
+
<DialogContent className="max-w-4xl">
|
| 7 |
+
<DialogHeader><DialogTitle>Post #{post.id}</DialogTitle></DialogHeader>
|
| 8 |
+
<img src={post.fileUrl} alt="" className="w-full rounded" />
|
| 9 |
+
<div className="mt-4">
|
| 10 |
+
<p className="text-sm mb-2">{post.tags.join(', ')}</p>
|
| 11 |
+
<a href={post.source} target="_blank" rel="noreferrer" className="text-blue-500 underline">Source</a>
|
| 12 |
+
</div>
|
| 13 |
+
</DialogContent>
|
| 14 |
+
</Dialog>
|
| 15 |
+
);
|
| 16 |
+
}
|