schlechtenburg/packages/core/lib/components/internal/BlockPlaceholder.tsx
2020-12-27 22:32:43 +01:00

24 lines
536 B
TypeScript

import { defineComponent } from 'vue';
import { BlockDefinition } from '../TreeElement';
import BlockPicker from './BlockPicker';
import './BlockPlaceholder.scss';
export default defineComponent({
name: 'sb-block-placeholder',
setup(props, context) {
return () => (
<div class="sb-block-placeholder">
<BlockPicker
{...{
on: {
'picked-block': (block: BlockDefinition) => context.emit('insert-block', block),
},
}}
/>
</div>
);
},
});