From b4919d6c3e3d666c06979b5324cffe34e397d9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Fri, 11 Mar 2022 18:26:30 +0100 Subject: [PATCH] Fix heading level in edit --- .../core/lib/components/GlobalInsert.scss | 2 -- packages/core/lib/components/GlobalInsert.tsx | 32 ------------------- packages/core/lib/components/MainMenu.tsx | 2 -- packages/heading/lib/edit.tsx | 2 +- 4 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 packages/core/lib/components/GlobalInsert.scss delete mode 100644 packages/core/lib/components/GlobalInsert.tsx diff --git a/packages/core/lib/components/GlobalInsert.scss b/packages/core/lib/components/GlobalInsert.scss deleted file mode 100644 index e1a3813..0000000 --- a/packages/core/lib/components/GlobalInsert.scss +++ /dev/null @@ -1,2 +0,0 @@ -.sb-global-insert { -} diff --git a/packages/core/lib/components/GlobalInsert.tsx b/packages/core/lib/components/GlobalInsert.tsx deleted file mode 100644 index 463fd47..0000000 --- a/packages/core/lib/components/GlobalInsert.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { defineComponent } from 'vue'; -import { ITreeNode } from '../types'; -import { useBlockTree } from '../use-block-tree'; -import { useActivation } from '../use-activation'; - -import { SbBlockPicker } from './BlockPicker'; -import { SbButton } from './Button'; - -import './GlobalInsert.scss'; - -export const SbGlobalInsert = defineComponent({ - name: 'sb-global-insert', - - setup() { - const { blockTree } = useBlockTree(); - const { - activate, - activeBlockId, - } = useActivation(); - - return () => ( - blockTree.value - ? +, - }} - /> - : '' - ); - }, -}); diff --git a/packages/core/lib/components/MainMenu.tsx b/packages/core/lib/components/MainMenu.tsx index 4964fe2..f47a84a 100644 --- a/packages/core/lib/components/MainMenu.tsx +++ b/packages/core/lib/components/MainMenu.tsx @@ -4,7 +4,6 @@ import { } from 'vue'; import { IBlockData } from '../types'; import { SbTreeBlockSelect } from './TreeBlockSelect'; -import { SbGlobalInsert } from './GlobalInsert'; import './MainMenu.scss'; @@ -22,7 +21,6 @@ export const SbMainMenu = defineComponent({ return () => (
-
); }, diff --git a/packages/heading/lib/edit.tsx b/packages/heading/lib/edit.tsx index 6f7f7d5..30d6db8 100644 --- a/packages/heading/lib/edit.tsx +++ b/packages/heading/lib/edit.tsx @@ -88,7 +88,7 @@ export default defineComponent({ const classes = computed(() => ({ 'sb-heading': true, 'sb-heading_focused': localData.focused, - [`sb-heading_align${localData.align}`]: true, + [`sb-heading_align-${localData.align}`]: true, [`sb-heading_${localData.level}`]: true, }));