your personal website on atproto - mirror
blento.app
1import type { CardDefinition } from '../types';
2import ButtonCard from './ButtonCard.svelte';
3import EditingButtonCard from './EditingButtonCard.svelte';
4import ButtonCardSettings from './ButtonCardSettings.svelte';
5
6export const ButtonCardDefinition: CardDefinition = {
7 type: 'button',
8 contentComponent: ButtonCard,
9 editingContentComponent: EditingButtonCard,
10 settingsComponent: ButtonCardSettings,
11 sidebarButtonText: 'Button',
12
13 createNew: (card) => {
14 card.cardData = {
15 text: 'Click me'
16 };
17 card.w = 2;
18 card.h = 1;
19 card.mobileW = 4;
20 card.mobileH = 2;
21 },
22
23 defaultColor: 'transparent',
24 allowSetColor: true,
25 canHaveLabel: false,
26
27 minW: 2,
28 minH: 1,
29 maxW: 8,
30 maxH: 4
31};