Updated
This commit is contained in:
parent
4430d24a3e
commit
2af3c67303
25 changed files with 5941 additions and 22 deletions
19
frontend/@dasig/components/Image.tsx
Normal file
19
frontend/@dasig/components/Image.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/** biome-ignore-all lint/complexity/noUselessFragments: <_> */
|
||||
|
||||
interface Props {
|
||||
name: string
|
||||
size?: number
|
||||
radius?: number | 0
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<picture>
|
||||
<source srcset={`./@dasig/images/${props.name}.avif`} type="image/avif" />
|
||||
<source srcset={`./@dasig/images/${props.name}.webp`} type="image/webp" />
|
||||
<img style={`border-radius: ${props.radius}rem`} width={props.size} height="auto" decoding="async" loading="lazy" alt={props.name + ' image'} />
|
||||
</picture>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue