your personal website on atproto - mirror blento.app
at remove-extra-buttons 31 lines 1.0 kB view raw
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 28 groups: ['Visual'], 29 icon: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-4"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" /></svg>` 30 31} as CardDefinition & { type: 'draw' };