Re-organized files
This commit is contained in:
parent
ea7be8fb39
commit
621faea4c2
53 changed files with 1434 additions and 1059 deletions
19
fwt/components/Image.tsx
Normal file
19
fwt/components/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