Use title rather than alt for figures

This commit is contained in:
Jade Ellis
2024-07-16 20:53:09 +01:00
parent 1930ff408d
commit fa8f29382b
@@ -1,6 +1,7 @@
<script>
export let src;
export let alt;
export let title;
let className = ""
export { className as class };
// console.log(src)
@@ -8,9 +9,9 @@
</script>
<figure class={className}>
<img {src} {alt} />
{#if alt}
<figcaption>{alt}</figcaption>
<img {src} {alt} {title} />
{#if title}
<figcaption>{title}</figcaption>
{/if}
</figure>