Added radius

This commit is contained in:
Patrick Alvin Alcala 2025-08-29 10:23:54 +08:00
parent c2d99f8b1b
commit ab99131b4e

View file

@ -3,6 +3,7 @@ interface Props {
webp: string
size?: number
alt?: string
radius?: number
}
export default (props: Props) => {
@ -11,7 +12,7 @@ export default (props: Props) => {
<picture>
<source srcset={props.avif} type="image/avif" />
<source srcset={props.webp} type="image/webp" />
<img width={props.size} height="auto" decoding="async" loading="lazy" alt={props.alt} />
<img style={`border-radius: ${props.radius}rem`} width={props.size} height="auto" decoding="async" loading="lazy" alt={props.alt} />
</picture>
</>
)