style: new style of markdown editor
This commit is contained in:
@@ -29,7 +29,7 @@ export const MarkdownEditor = ({ placeholder, source, setSource }: Props) => {
|
||||
return (
|
||||
<div class="markdown-editor">
|
||||
<div class="editor">
|
||||
<h1>Editor</h1>
|
||||
<div class="label">Editor</div>
|
||||
<textarea
|
||||
onInput={e => setSource(e.target instanceof HTMLTextAreaElement ? e.target.value : '')}
|
||||
value={source}
|
||||
@@ -39,7 +39,7 @@ export const MarkdownEditor = ({ placeholder, source, setSource }: Props) => {
|
||||
></textarea>
|
||||
</div>
|
||||
<div class="preview">
|
||||
<h1>Preview</h1>
|
||||
<div class="label">Preview</div>
|
||||
<div class="preview-content">
|
||||
{source.trim().length ? <Markdown source={source} /> : <div class="placeholder">{placeholder}</div>}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user