your personal website on atproto - mirror
blento.app
1import { COLUMNS } from '$lib';
2import type { CardDefinition } from '../types';
3import EditingSectionCard from './EditingSectionCard.svelte';
4import SectionCard from './SectionCard.svelte';
5
6export const SectionCardDefinition = {
7 type: 'section',
8 contentComponent: SectionCard,
9 editingContentComponent: EditingSectionCard,
10 createNew: (card) => {
11 card.cardType = 'section';
12 card.cardData = {
13 text: 'hello world'
14 };
15
16 card.h = 1;
17 card.mobileH = 2;
18
19 card.w = COLUMNS;
20 card.mobileW = COLUMNS;
21 },
22
23 defaultColor: 'transparent',
24 maxH: 1,
25 canResize: false
26} as CardDefinition & { type: 'section' };