schlechtenburg/packages/core/lib/components/internal/BlockPlaceholder.tsx

20 lines
473 B
TypeScript
Raw Normal View History

2020-12-27 21:32:43 +00:00
import { defineComponent } from 'vue';
2020-12-30 01:32:46 +00:00
import { BlockDefinition } from '/@/blocks';
import BlockPicker from '/@internal/BlockPicker';
2020-05-20 14:21:08 +00:00
import './BlockPlaceholder.scss';
export default defineComponent({
name: 'sb-block-placeholder',
2020-05-25 21:10:21 +00:00
setup(props, context) {
return () => (
2020-05-20 14:21:08 +00:00
<div class="sb-block-placeholder">
2020-05-24 20:00:14 +00:00
<BlockPicker
2020-12-30 01:32:46 +00:00
onPickedBlock={(block: BlockDefinition) => context.emit('insert-block', block)}
2020-05-24 20:00:14 +00:00
/>
2020-05-20 14:21:08 +00:00
</div>
);
},
});