diff --git a/packages/core/lib/components/BlockPicker.tsx b/packages/core/lib/components/BlockPicker.tsx index 9a7225d..2990b1c 100644 --- a/packages/core/lib/components/BlockPicker.tsx +++ b/packages/core/lib/components/BlockPicker.tsx @@ -42,7 +42,7 @@ export const SbBlockPicker = defineComponent({ open.value = true; $event.stopPropagation(); }} - >Add a block + >+ $event.stopPropagation()} diff --git a/packages/core/lib/components/BlockToolbar.scss b/packages/core/lib/components/BlockToolbar.scss new file mode 100644 index 0000000..e69de29 diff --git a/packages/core/lib/components/BlockToolbar.tsx b/packages/core/lib/components/BlockToolbar.tsx new file mode 100644 index 0000000..62e4875 --- /dev/null +++ b/packages/core/lib/components/BlockToolbar.tsx @@ -0,0 +1,28 @@ +import { + defineComponent, + PropType, +} from 'vue'; +import { Block } from '../blocks'; + +import './BlockToolbar.scss'; + +interface BlockToolbarProps { + block: Block; +} + +export const SbBlockToolbar = defineComponent({ + name: 'sb-block-toolbar', + + props: { + block: { + type: (null as unknown) as PropType, + required: true, + }, + }, + + setup(props: BlockToolbarProps, context) { + return () => ( +
+ ); + }, +}); diff --git a/packages/core/lib/components/Schlechtenburg.tsx b/packages/core/lib/components/Schlechtenburg.tsx index a604822..fb96d46 100644 --- a/packages/core/lib/components/Schlechtenburg.tsx +++ b/packages/core/lib/components/Schlechtenburg.tsx @@ -20,6 +20,7 @@ import { EditorDimensions, useResizeObserver } from '../use-resize-observer'; import { ActiveBlock } from '../use-activation'; import { SbMainMenu } from './MainMenu'; +import { SbBlockToolbar } from './BlockToolbar'; import { SbBlock } from './Block'; import './Schlechtenburg.scss'; @@ -80,7 +81,10 @@ export const Schlechtenburg = defineComponent({ > { mode.value === SbMode.Edit - ? + ? <> + + + : null }