1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00
- hide/show code editor based on markdown editor state (could be CODE or PREVIEW);
- changed styles for code editor;
This commit is contained in:
Pavlo Tymchuk
2017-05-04 23:09:48 +02:00
parent 6a711d6a71
commit 90846fab81
2 changed files with 11 additions and 4 deletions

View File

@@ -221,7 +221,10 @@ class MarkdownEditor extends React.Component {
onKeyDown={(e) => this.handleKeyDown(e)}
onKeyUp={(e) => this.handleKeyUp(e)}
>
<CodeEditor styleName='codeEditor'
<CodeEditor styleName={this.state.status === 'CODE'
? 'codeEditor'
: 'codeEditor--hide'
}
ref='code'
mode='GitHub Flavored Markdown'
value={value}

View File

@@ -4,8 +4,14 @@
.codeEditor
absolute top bottom left right
.hide
z-index 0
opacity 0
pointer-events none
.codeEditor--hide
@extend .codeEditor
@extend .hide
.preview
display block
@@ -17,7 +23,5 @@
.preview--hide
@extend .preview
z-index 0
opacity 0
pointer-events none
@extend .hide