your personal website on atproto - mirror blento.app
at remove-extra-buttons 26 lines 841 B view raw
1import type { CardDefinition } from '../types'; 2import CreateEmbedCardModal from './CreateEmbedCardModal.svelte'; 3import EmbedCard from './EmbedCard.svelte'; 4 5export const EmbedCardDefinition = { 6 type: 'embed', 7 contentComponent: EmbedCard, 8 creationModalComponent: CreateEmbedCardModal, 9 10 createNew: (card) => { 11 card.w = 4; 12 card.h = 4; 13 card.mobileH = 8; 14 card.mobileW = 8; 15 }, 16 17 // canChange: (item) => Boolean(item.cardData.href), 18 19 // change: (item) => { 20 // return item; 21 // }, 22 name: 'Embed', 23 groups: ['Media'], 24 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="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5" /></svg>` 25 26} as CardDefinition & { type: 'embed' };