Fix heading level in edit

This commit is contained in:
Benjamin Bädorf 2022-03-11 18:26:30 +01:00
parent 4ffafd4bb5
commit b4919d6c3e
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
4 changed files with 1 additions and 37 deletions

View file

@ -1,2 +0,0 @@
.sb-global-insert {
}

View file

@ -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
? <SbBlockPicker
class="sb-global-insert"
v-slots={{
default: ({ toggle }: { toggle: Function }) => <SbButton {...{ onClick: toggle }}>+</SbButton>,
}}
/>
: ''
);
},
});

View file

@ -4,7 +4,6 @@ import {
} from 'vue'; } from 'vue';
import { IBlockData } from '../types'; import { IBlockData } from '../types';
import { SbTreeBlockSelect } from './TreeBlockSelect'; import { SbTreeBlockSelect } from './TreeBlockSelect';
import { SbGlobalInsert } from './GlobalInsert';
import './MainMenu.scss'; import './MainMenu.scss';
@ -22,7 +21,6 @@ export const SbMainMenu = defineComponent({
return () => ( return () => (
<div class="sb-main-menu"> <div class="sb-main-menu">
<SbTreeBlockSelect /> <SbTreeBlockSelect />
<SbGlobalInsert />
</div> </div>
); );
}, },

View file

@ -88,7 +88,7 @@ export default defineComponent({
const classes = computed(() => ({ const classes = computed(() => ({
'sb-heading': true, 'sb-heading': true,
'sb-heading_focused': localData.focused, 'sb-heading_focused': localData.focused,
[`sb-heading_align${localData.align}`]: true, [`sb-heading_align-${localData.align}`]: true,
[`sb-heading_${localData.level}`]: true, [`sb-heading_${localData.level}`]: true,
})); }));