-
-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Add support for markdown in the text bookmarks
- Loading branch information
1 parent
2fa7177
commit 24e1dbe
Showing
7 changed files
with
692 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/web/app/dashboard/bookmarks/components/BookmarkedTextViewer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ZBookmark } from "@/lib/types/api/bookmarks"; | ||
import { Dialog, DialogContent } from "@/components/ui/dialog"; | ||
import Markdown from "react-markdown"; | ||
|
||
export function BookmarkedTextViewer({ | ||
content, | ||
open, | ||
setOpen, | ||
}: { | ||
content: string; | ||
open: boolean; | ||
setOpen: (open: boolean) => void; | ||
}) { | ||
return ( | ||
<Dialog open={open} onOpenChange={setOpen}> | ||
<DialogContent className="max-h-[75%] overflow-scroll"> | ||
<Markdown className="prose">{content}</Markdown> | ||
</DialogContent> | ||
</Dialog> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.