Tweaked editor actions
This commit is contained in:
@@ -5,5 +5,8 @@
|
||||
cursor: pointer;
|
||||
min-height: 43px;
|
||||
padding: 0 0.5rem;
|
||||
color: #0C77F8;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #171B35;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,12 @@ class SaveAction extends React.Component {
|
||||
<a
|
||||
href
|
||||
onClick={ this.onClick }
|
||||
style={{ opacity: this.props.disabled ? 0.5 : 1 }}
|
||||
style={ { opacity: this.props.disabled ? 0.5 : 1 } }
|
||||
title="Save changes (Cmd+Enter)"
|
||||
>Save</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default SaveAction;
|
||||
export default SaveAction;
|
||||
@@ -0,0 +1,2 @@
|
||||
import SaveAction from './SaveAction';
|
||||
export default SaveAction;
|
||||
@@ -1,10 +1,12 @@
|
||||
import Layout from './Layout';
|
||||
import Title from './components/Title';
|
||||
import HeaderAction from './components/HeaderAction';
|
||||
import SaveAction from './components/SaveAction';
|
||||
|
||||
export default Layout;
|
||||
|
||||
export {
|
||||
Title,
|
||||
HeaderAction,
|
||||
SaveAction,
|
||||
};
|
||||
|
||||
@@ -8,14 +8,13 @@ import DocumentEditStore, {
|
||||
} from './DocumentEditStore';
|
||||
|
||||
import Switch from 'components/Switch';
|
||||
import Layout, { Title, HeaderAction } from 'components/Layout';
|
||||
import Layout, { Title, HeaderAction, SaveAction } from 'components/Layout';
|
||||
import Flex from 'components/Flex';
|
||||
import AtlasPreviewLoading from 'components/AtlasPreviewLoading';
|
||||
import CenteredContent from 'components/CenteredContent';
|
||||
import DropdownMenu, { MenuItem } from 'components/DropdownMenu';
|
||||
import DropdownMenu, { MenuItem, MoreIcon } from 'components/DropdownMenu';
|
||||
|
||||
import EditorLoader from './components/EditorLoader';
|
||||
import SaveAction from './components/SaveAction';
|
||||
|
||||
const DISREGARD_CHANGES = `You have unsaved changes.
|
||||
Are you sure you want to disgard them?`;
|
||||
@@ -120,8 +119,6 @@ class DocumentEdit extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
console.log("DocumentEdit#render", this.store.preview);
|
||||
|
||||
let title = (
|
||||
<Title
|
||||
truncate={ 60 }
|
||||
@@ -141,7 +138,7 @@ class DocumentEdit extends Component {
|
||||
disabled={ this.store.isSaving }
|
||||
/>
|
||||
</HeaderAction>
|
||||
<DropdownMenu label="More">
|
||||
<DropdownMenu label={ <MoreIcon /> }>
|
||||
<MenuItem onClick={ this.store.togglePreview }>
|
||||
Preview <Switch checked={ this.store.preview } />
|
||||
</MenuItem>
|
||||
|
||||
Reference in New Issue
Block a user