diff --git a/src/components/EntryEditor/EntryEditor.css b/src/components/EntryEditor/EntryEditor.css index 5dc51cd4e25d..8256be03e60d 100644 --- a/src/components/EntryEditor/EntryEditor.css +++ b/src/components/EntryEditor/EntryEditor.css @@ -3,7 +3,7 @@ height: 100%; } -.nc-entryEditor-toggleButtons { +.nc-entryEditor-controlPaneButtons { position: absolute; top: 8px; right: 20px; @@ -13,8 +13,12 @@ justify-content: flex-end; } -.nc-entryEditor-toggleButtons > * + * { - margin-left: 10px; +.nc-entryEditor-toggleButton { + margin-left: 5px; +} + +.nc-entryEditor-toggleButtonShow { + right: 60px; } .nc-entryEditor-controlPane { diff --git a/src/components/EntryEditor/EntryEditor.js b/src/components/EntryEditor/EntryEditor.js index 6b94f6b65df5..0b38e48f6f18 100644 --- a/src/components/EntryEditor/EntryEditor.js +++ b/src/components/EntryEditor/EntryEditor.js @@ -67,21 +67,11 @@ class EntryEditor extends Component { const collectionPreviewEnabled = collection.getIn(['editor', 'preview'], true); - const TogglePreviewButton = () => ( + const ToggleButton = ({ icon, onClick }) => ( - ); - - const ToggleScrollSyncButton = () => ( - @@ -89,13 +79,21 @@ class EntryEditor extends Component { const editor = ( this.updateStickyContext = fn} > { collectionPreviewEnabled ? ( - - { previewVisible && } - + + { previewVisible && ( + + ) } + ) : null } {editor} - +