mirror of
https://github.com/Steffo99/unisteffo.git
synced 2024-11-21 23:44:22 +00:00
✨ Add temporary Image component
This commit is contained in:
parent
e151b74be5
commit
18f2a45982
2 changed files with 18 additions and 0 deletions
15
src/components/Image.js
Normal file
15
src/components/Image.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import React from "react"
|
||||
import {Anchor, Paragraph} from "bluelib/lib/components"
|
||||
import Style from "./Image.module.css"
|
||||
import classNames from "classnames"
|
||||
|
||||
|
||||
export default function Image({ src, description, className, ...props }) {
|
||||
return (
|
||||
<Paragraph>
|
||||
<Anchor href={src}>
|
||||
<img alt={`[${description}]`} title={description} src={src} className={classNames(Style.Image, className)} {...props}/>
|
||||
</Anchor>
|
||||
</Paragraph>
|
||||
)
|
||||
}
|
3
src/components/Image.module.css
Normal file
3
src/components/Image.module.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
.Image {
|
||||
max-width: 100%;
|
||||
}
|
Loading…
Reference in a new issue