dasig-static/@dasig/components/Image.astro
2026-03-24 19:27:19 +08:00

17 lines
391 B
Text

---
interface Props {
avif: string
webp: string
size?: number
alt?: string
radius?: number
}
const { avif, webp, size, alt, radius } = Astro.props
---
<picture>
<source srcset={avif} type="image/avif" />
<source srcset={webp} type="image/webp" />
<img style={`border-radius: ${radius}rem`} width={size} height="auto" decoding="async" loading="lazy" alt={alt} />
</picture>