Use title rather than alt for figures
This commit is contained in:
parent
1930ff408d
commit
fa8f29382b
1 changed files with 4 additions and 3 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue