diff --git a/src/lib/components/Card.svelte b/src/lib/components/Card.svelte index b52d551..f76d30c 100644 --- a/src/lib/components/Card.svelte +++ b/src/lib/components/Card.svelte @@ -16,8 +16,9 @@ * * Two deliberate extensions to the upstream API, neither of which changes how * a plain Card renders: - * - `href` renders the card as an anchor, making the whole card one click - * target (upstream is always a
). + * - `href` makes the title a link (upstream has no link variant). Only the + * title is the link, not the whole card: text inside an anchor cannot be + * selected by dragging, and the subtitle and body must stay selectable. * - `leading` is a snippet slot before the titles, for an icon. */ import type { Snippet } from 'svelte'; @@ -62,7 +63,8 @@
{#if title} - {title}{#if href}{title}{:else}{title}{/if} {/if} {#if subtitle} @@ -79,24 +81,13 @@ {/if} {/snippet} -{#if href} - - {@render inner()} - -{:else} -
- {@render inner()} -
-{/if} +
+ {@render inner()} +