aboutsummaryrefslogtreecommitdiffstats
path: root/apps/browser-extension/src/components/ui/textarea.tsx
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-11-08 18:52:30 +0000
committerGitHub <noreply@github.com>2025-11-08 18:52:30 +0000
commit098e56a8950efbef79e551e12622ae7c8cd90c03 (patch)
tree6d6f98b4e69ede48ea6efc5101065a3f05fccbdc /apps/browser-extension/src/components/ui/textarea.tsx
parenta2203196ff3353a6f7efaac5df25844880807baf (diff)
downloadkarakeep-098e56a8950efbef79e551e12622ae7c8cd90c03.tar.zst
feat(extension): Allow writing notes directly in the extension (#2104)
* feat(extension): add notes editor to bookmark hoarded screen Adds the ability to directly add and edit notes for bookmarks in the browser extension's hoarded screen (the page shown after saving a bookmark). Changes: - Created Textarea UI component for the browser extension - Created NoteEditor component that uses useUpdateBookmark hook - Added Notes section to BookmarkSavedPage, displayed between the header and tags - Notes auto-save when the user clicks away from the textarea (onBlur) - Shows saving state and error messages to the user This brings feature parity with the web app's notes functionality. * add explicit button * more fixes --------- Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to 'apps/browser-extension/src/components/ui/textarea.tsx')
-rw-r--r--apps/browser-extension/src/components/ui/textarea.tsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/apps/browser-extension/src/components/ui/textarea.tsx b/apps/browser-extension/src/components/ui/textarea.tsx
new file mode 100644
index 00000000..6651e331
--- /dev/null
+++ b/apps/browser-extension/src/components/ui/textarea.tsx
@@ -0,0 +1,23 @@
+import * as React from "react";
+
+import { cn } from "../../utils/css";
+
+export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
+
+const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
+ ({ className, ...props }, ref) => {
+ return (
+ <textarea
+ className={cn(
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
+ className,
+ )}
+ ref={ref}
+ {...props}
+ />
+ );
+ },
+);
+Textarea.displayName = "Textarea";
+
+export { Textarea };