your personal website on atproto - mirror blento.app
at main 17 lines 516 B view raw
1<script lang="ts"> 2 import { CardDefinitionsByType } from '..'; 3 import type { ContentComponentProps } from '../types'; 4 5 let { item = $bindable() }: ContentComponentProps = $props(); 6</script> 7 8{#if CardDefinitionsByType[item.cardType]} 9 {@const cardDef = CardDefinitionsByType[item.cardType]} 10 {#if cardDef.editingContentComponent} 11 <cardDef.editingContentComponent bind:item /> 12 {:else} 13 <cardDef.contentComponent bind:item /> 14 {/if} 15{:else} 16 <div class="m-4">Unsupported card type: {item.cardType}</div> 17{/if}