diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/card-v4.svelte | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/components/card-v4.svelte b/src/components/card-v4.svelte index d067357..ff35492 100644 --- a/src/components/card-v4.svelte +++ b/src/components/card-v4.svelte @@ -1,13 +1,20 @@ <script lang="ts"> - export let title; - export let description; + import { PortableText } from "@portabletext/svelte"; + import type { InputValue } from "@portabletext/svelte/ptTypes"; + + export let title: string | undefined; + export let description: string | undefined | InputValue; </script> <div class="card"> <div class="p-6"> - <h3 class="mt-0">I have a dream</h3> + <h3 class="mt-0">{title}</h3> <p class="text-contrast-medium mt-3 mx-0 mb-4"> - Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quia minus culpa commodi. + {#if typeof description === "string"} + {description} + {:else} + <PortableText value={description} /> + {/if} </p> <div class="flex flex-wrap gap-3"> <a href="#0" class="btn btn--subtle">Learn more</a> |
