From f9ee5031fde6ee559e3c73b3e52ae135a6a21cdd Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Wed, 3 Aug 2022 15:43:03 -0700 Subject: [PATCH] Update editor style for send button --- web/components/editor.tsx | 23 ++++++++--------------- web/components/feed/feed-comments.tsx | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 29 deletions(-) diff --git a/web/components/editor.tsx b/web/components/editor.tsx index 868c2129..f71e8589 100644 --- a/web/components/editor.tsx +++ b/web/components/editor.tsx @@ -50,7 +50,7 @@ export function useTextEditor(props: { const editorClass = clsx( proseClass, !simple && 'min-h-[6em]', - 'resize-none outline-none border-none pt-3 px-4 focus:ring-0' + 'outline-none pt-2 px-4' ) const editor = useEditor( @@ -123,8 +123,9 @@ function isValidIframe(text: string) { export function TextEditor(props: { editor: Editor | null upload: ReturnType + children?: React.ReactNode // additional toolbar buttons }) { - const { editor, upload } = props + const { editor, upload, children } = props const [iframeOpen, setIframeOpen] = useState(false) return ( @@ -146,20 +147,10 @@ export function TextEditor(props: { images! )} -
+
- {/* Spacer element to match the height of the toolbar */} - - - {/* Toolbar, with buttons for image and embeds */} -
-
+ {/* Toolbar, with buttons for images and embeds */} +
Embed an iframe
+
+ {children}
diff --git a/web/components/feed/feed-comments.tsx b/web/components/feed/feed-comments.tsx index 07a5db6d..0a7b3a90 100644 --- a/web/components/feed/feed-comments.tsx +++ b/web/components/feed/feed-comments.tsx @@ -505,29 +505,23 @@ export function CommentInputTextArea(props: { return ( <> - - - +
+ {user && !isSubmitting && ( )} + {isSubmitting && ( )} - - + +
{!user && (