From f9f4caf2601879930720ee753fadf78a42726368 Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Fri, 16 Jun 2023 19:49:28 -0400 Subject: [PATCH] feat: Redesign the format bar / textarea into a single bordered area with divider --- .../components/common/markdown-textarea.tsx | 206 ++++++++++-------- 1 file changed, 115 insertions(+), 91 deletions(-) diff --git a/src/shared/components/common/markdown-textarea.tsx b/src/shared/components/common/markdown-textarea.tsx index 7405638f..5d932204 100644 --- a/src/shared/components/common/markdown-textarea.tsx +++ b/src/shared/components/common/markdown-textarea.tsx @@ -1,4 +1,5 @@ import autosize from "autosize"; +import classNames from "classnames"; import { NoOptionI18nKeys } from "i18next"; import { Component, linkEvent } from "inferno"; import { Language } from "lemmy-js-client"; @@ -143,100 +144,123 @@ export class MarkdownTextArea extends Component< } />
-
- {this.getFormatButton("bold", this.handleInsertBold)} - {this.getFormatButton("italic", this.handleInsertItalic)} - {this.getFormatButton("link", this.handleInsertLink)} - this.handleEmoji(this, e)} - disabled={this.isDisabled} - > -
- - -
- {this.getFormatButton("header", this.handleInsertHeader)} - {this.getFormatButton( - "strikethrough", - this.handleInsertStrikethrough - )} - {this.getFormatButton("quote", this.handleInsertQuote)} - {this.getFormatButton("list", this.handleInsertList)} - {this.getFormatButton("code", this.handleInsertCode)} - {this.getFormatButton("subscript", this.handleInsertSubscript)} - {this.getFormatButton("superscript", this.handleInsertSuperscript)} - {this.getFormatButton("spoiler", this.handleInsertSpoiler)} - +
- - -
- -
-