Merge pull request #1340 from jsit/fix/markdown-bootstrap-classes

fix: Remove inline styles and use Bootstrap classes
This commit is contained in:
SleeplessOne1917 2023-06-17 02:50:48 +00:00 committed by GitHub
commit 958bb8c209
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,18 +146,8 @@ export class MarkdownTextArea extends Component<
/> />
<div className="form-group row"> <div className="form-group row">
<div className="col-12"> <div className="col-12">
<div <div className="rounded bg-light border border-light">
className="rounded bg-light overflow-hidden" <div className="d-flex flex-wrap border-bottom border-light">
style={{
border: "1px solid var(--medium-light)",
}}
>
<div
className="d-flex flex-wrap"
style={{
"border-bottom": "1px solid var(--medium-light)",
}}
>
{this.getFormatButton("bold", this.handleInsertBold)} {this.getFormatButton("bold", this.handleInsertBold)}
{this.getFormatButton("italic", this.handleInsertItalic)} {this.getFormatButton("italic", this.handleInsertItalic)}
{this.getFormatButton("link", this.handleInsertLink)} {this.getFormatButton("link", this.handleInsertLink)}
@ -219,9 +209,12 @@ export class MarkdownTextArea extends Component<
<div> <div>
<textarea <textarea
id={this.id} id={this.id}
className={classNames("form-control border-0 rounded-0", { className={classNames(
"form-control border-0 rounded-bottom",
{
"d-none": this.state.previewMode, "d-none": this.state.previewMode,
})} }
)}
value={this.state.content} value={this.state.content}
onInput={linkEvent(this, this.handleContentChange)} onInput={linkEvent(this, this.handleContentChange)}
onPaste={linkEvent(this, this.handleImageUploadPaste)} onPaste={linkEvent(this, this.handleImageUploadPaste)}