Changed from astro to pure solidjs
This commit is contained in:
parent
3203e91c5a
commit
e85dc60101
76 changed files with 2281 additions and 3843 deletions
19
src/components/Image/Image.tsx
Normal file
19
src/components/Image/Image.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
interface Props {
|
||||
avif: string
|
||||
webp: string
|
||||
size?: number
|
||||
alt?: string
|
||||
radius?: number
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<picture>
|
||||
<source srcset={props.avif} type="image/avif" />
|
||||
<source srcset={props.webp} type="image/webp" />
|
||||
<img style={`border-radius: ${props.radius}rem`} width={props.size} height="auto" decoding="async" loading="lazy" alt={props.alt} />
|
||||
</picture>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue