Commit 26256947 authored by chris's avatar chris
Browse files

new toolbar in layout

parent a3cac2f2
......@@ -45,7 +45,7 @@ import invisibles, {
export default {
MenuService: [
{
templateArea: 'topBar',
templateArea: 'mainMenuToolBar',
toolGroups: [
'Base',
{
......@@ -65,6 +65,23 @@ export default {
templateArea: 'leftSideBar',
toolGroups: ['DisplayText'],
},
{
templateArea: 'commentTrackToolBar',
toolGroups: [
{
name: 'Annotations',
more: [
'Superscript',
'Subscript',
'SmallCaps',
'Emphasis',
'Code',
'Underline',
'StrikeThrough',
],
},
],
},
],
SchemaService: DefaultSchema,
......
......@@ -67,7 +67,7 @@ const TopMenu = styled.div`
> div:last-child {
margin-left: 0;
margin-right: 10px;
margin-right: ${grid(5)};
}
> div[data-name="Tables"]{
......@@ -122,6 +122,20 @@ const CommentsContainerNotes = styled.div`
height: 100%;
`;
const CommentTrackTools = styled.div`
padding: ${grid(2)}0 0 0;
position: fixed;
display: flex;
margin-left: 5px;
z-index: 999;
height: 30px;
width: 29.4%;
background: #fff;
span {
margin-left: auto;
}
`;
const NotesAreaContainer = styled.div`
background: #fff;
display: flex;
......@@ -165,9 +179,10 @@ const getNotes = main => {
};
const LeftSideBar = ComponentPlugin('leftSideBar');
const TopBar = ComponentPlugin('topBar');
const MainMenuToolBar = ComponentPlugin('mainMenuToolBar');
const NotesArea = ComponentPlugin('notesArea');
const RightArea = ComponentPlugin('rightArea');
const CommentTrackToolBar = ComponentPlugin('commentTrackToolBar');
const WaxOverlays = ComponentPlugin('waxOverlays');
const EditoriaLayout = ({ editor }) => {
......@@ -195,7 +210,7 @@ const EditoriaLayout = ({ editor }) => {
<ThemeProvider theme={cokoTheme}>
<Wrapper>
<TopMenu>
<TopBar />
<MainMenuToolBar />
</TopMenu>
<Main>
......@@ -215,6 +230,12 @@ const EditoriaLayout = ({ editor }) => {
<WaxSurfaceScroll>
<EditorContainer>{editor}</EditorContainer>
<CommentsContainer>
<CommentTrackTools>
<span>
58 COMMENTS AND SUGGESTIONS
<CommentTrackToolBar />
</span>
</CommentTrackTools>
<RightArea area="main" />
</CommentsContainer>
</WaxSurfaceScroll>
......
......@@ -5,7 +5,7 @@ import { WaxContext } from 'wax-prosemirror-core';
import MenuButton from '../ui/buttons/MenuButton';
const Button = ({ view = {}, item }) => {
const { active, enable, icon, label, onlyOnMain, run, select, title } = item;
const { active, icon, label, onlyOnMain, run, select, title } = item;
const {
view: { main },
......@@ -29,8 +29,8 @@ const Button = ({ view = {}, item }) => {
const MenuButtonComponent = useMemo(
() => (
<MenuButton
active={isActive || false}
disabled={isDisabled}
active={false}
disabled={false}
iconName={icon}
label={label}
onMouseDown={e => handleMouseDown(e, view.state, view.dispatch)}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment