1
0
Fork 0
mirror of https://ark.sudovanilla.org/Korbs/butterflyvu.git synced 2024-12-22 15:23:54 +00:00

Add Image component

This commit is contained in:
Korbs 2024-12-12 17:49:50 -05:00
parent 9ed2a54ffc
commit 84dec24e1d

View file

@ -0,0 +1,17 @@
---
// Properties
const {
Source,
Alt
} = Astro.props
---
<img
src={Source}
alt={Alt}
onload="this.style.transition = '1s opacity'; this.style.opacity = '1'"
/>
<!-- Once the image is done loading, instead of cutting in, try to fade in instead. -->
<!-- See the `onload` script in the image tag. -->
<style>img {opacity: 0}</style>