feat: modify blocksuite

This commit is contained in:
QiShaoXuan
2022-12-09 01:37:32 +08:00
parent 8885cd0ba2
commit 6e327900f1
7 changed files with 225 additions and 84 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ export const Editor = () => {
editorContainer.current?.appendChild(editor);
initDefaultContent(editor);
// initDefaultContent(editor);
}
}, [editor]);
@@ -9,8 +9,10 @@ import {
} from './style';
import { Arrow } from './icons';
import Link from 'next/link';
import { useEditor } from '@/providers/editor-provider';
export const WorkSpaceSliderBar = () => {
const [show, setShow] = useState(false);
const { createPage } = useEditor();
const router = useRouter();
return (
<>
@@ -29,11 +31,9 @@ export const WorkSpaceSliderBar = () => {
>
Back to Doc
</StyledListItem>
<StyledListItem>
<Link href={{ pathname: '/all-page', query: { name: 'test' } }}>
All pages
</Link>
</StyledListItem>
<Link href={{ pathname: '/all-page', query: { name: 'test' } }}>
<StyledListItem>All pages</StyledListItem>
</Link>
<StyledListItem>Favourites</StyledListItem>
<StyledSubListItem>
document 1, this is a paper icondocument 1
@@ -43,7 +43,13 @@ export const WorkSpaceSliderBar = () => {
<StyledListItem>Import</StyledListItem>
<StyledListItem>Bin</StyledListItem>
<StyledNewPageButton>New Page</StyledNewPageButton>
<StyledNewPageButton
onClick={() => {
createPage();
}}
>
New Page
</StyledNewPageButton>
</StyledSliderBar>
<StyledArrowButton
isShow={show}