fixed accessibility
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { getFileAsset } from '@sanity/asset-utils';
|
||||
import { Download } from '@lucide/svelte';
|
||||
import { client } from '$lib/sanity';
|
||||
import Button from '../ui/button/button.svelte';
|
||||
|
||||
let { portableText } = $props();
|
||||
const { value } = portableText;
|
||||
@@ -10,8 +11,8 @@
|
||||
|
||||
{#if value?.asset}
|
||||
{@const file = getFileAsset(value, { projectId, dataset })}
|
||||
<a href={file.url} download class="inline-flex items-center gap-2 text-primary hover:underline">
|
||||
<Button href={file.url} download class="inline-flex items-center gap-2 text-primary hover:underline">
|
||||
<Download size={16} />
|
||||
{value.title || 'Download file'}
|
||||
</a>
|
||||
</Button>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user