your personal website on atproto - mirror blento.app
at hide-friends 34 lines 1.1 kB view raw
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 createNew: (card) => { 12 card.cardData = { 13 text: 'Click me' 14 }; 15 card.w = 2; 16 card.h = 1; 17 card.mobileW = 4; 18 card.mobileH = 2; 19 }, 20 21 defaultColor: 'transparent', 22 allowSetColor: true, 23 canHaveLabel: false, 24 25 minW: 2, 26 minH: 1, 27 maxW: 8, 28 maxH: 4, 29 30 keywords: ['cta', 'action', 'click', 'link'], 31 groups: ['Utilities'], 32 name: 'Button', 33 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="M15.042 21.672 13.684 16.6m0 0-2.51 2.225.569-9.47 5.227 7.917-3.286-.672ZM12 2.25V4.5m5.834.166-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243-1.59-1.59" /></svg>` 34};