Change many lines
This commit is contained in:
32
src/lib/components/Photo.svelte
Normal file
32
src/lib/components/Photo.svelte
Normal file
@ -0,0 +1,32 @@
|
||||
<script>
|
||||
/**
|
||||
* The source of the image.
|
||||
* @type {string}
|
||||
*/
|
||||
export let src;
|
||||
|
||||
/**
|
||||
* Alternative text for the image. Used for accessibility.
|
||||
* @type {string | undefined}
|
||||
*/
|
||||
export let alt = undefined;
|
||||
|
||||
/**
|
||||
* The click handler for the image.
|
||||
* @param {MouseEvent} event
|
||||
*/
|
||||
async function clickHandler(event) {
|
||||
event.preventDefault();
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<a href="{src}" on:click={clickHandler}>
|
||||
<figure class="photo">
|
||||
<img src="{src}" alt="{alt}" />
|
||||
</figure>
|
||||
</a>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user