mirror of
https://github.com/hex248/ob248.com.git
synced 2026-02-07 18:23:04 +00:00
26 lines
477 B
Plaintext
26 lines
477 B
Plaintext
---
|
|
interface Props {
|
|
image: string;
|
|
title: string;
|
|
type?: "boxed" | "simple";
|
|
}
|
|
|
|
const { image, title, type = "simple" } = Astro.props;
|
|
---
|
|
|
|
{type === "boxed" ? (
|
|
<div class="border demo-border">
|
|
<span>{title}</span>
|
|
<img
|
|
src={image}
|
|
alt={title}
|
|
class="object-cover"
|
|
/>
|
|
</div>
|
|
) : (
|
|
<img
|
|
src={image}
|
|
alt={title}
|
|
class="w-full h-full object-cover demo-border"
|
|
/>
|
|
)} |