Files
fuwari/src/components/misc/ImageBox.astro
saicaca 471c4020d5 feat: minor style fixes
(cherry picked from commit d09df23d1c42539bf1102600aca2d8f1713142d4)
2023-10-18 02:15:31 +08:00

16 lines
400 B
Plaintext

---
interface Props {
id?: string
src: string;
class?: string;
alt?: string
}
const {id, src, alt} = Astro.props;
const className = Astro.props.class;
---
<div class:list={[className, 'overflow-hidden relative']}>
<div class="transition absolute inset-0 dark:bg-black/10 bg-opacity-50"></div>
<img src={src} alt={alt} class="w-full h-full object-center object-cover">
</div>