diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-11-08 18:52:30 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-08 18:52:30 +0000 |
| commit | 098e56a8950efbef79e551e12622ae7c8cd90c03 (patch) | |
| tree | 6d6f98b4e69ede48ea6efc5101065a3f05fccbdc /apps/browser-extension/src/components/ui/textarea.tsx | |
| parent | a2203196ff3353a6f7efaac5df25844880807baf (diff) | |
| download | karakeep-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.tsx | 23 |
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 }; |
