your personal website on atproto - mirror
blento.app
1import type { CardDefinition } from '../types';
2import DrawCard from './DrawCard.svelte';
3import EditingDrawCard from './EditingDrawCard.svelte';
4
5export const DrawCardDefinition = {
6 type: 'draw',
7 name: 'Drawing',
8 contentComponent: DrawCard,
9 editingContentComponent: EditingDrawCard,
10 sidebarButtonText: 'Draw',
11 defaultColor: 'base',
12 allowSetColor: true,
13 minW: 2,
14 minH: 2,
15 createNew: (item) => {
16 item.w = 4;
17 item.h = 4;
18 item.mobileW = 4;
19 item.mobileH = 4;
20 item.cardData = {
21 strokesJson: '[]',
22 viewBox: '',
23 strokeWidth: 1,
24 locked: true
25 };
26 }
27} as CardDefinition & { type: 'draw' };