diff options
| author | Volpeon <git@volpeon.ink> | 2026-07-22 19:40:59 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2026-07-22 19:40:59 +0200 |
| commit | c1e28224aa2e1450031669d9a7e359b63e04687d (patch) | |
| tree | 68f3d8905c763a91f68001d868197effa92adafa /src/ui/objects/ContentImage.tsx | |
| download | corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.tar.gz corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.tar.bz2 corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.zip | |
Init
Diffstat (limited to 'src/ui/objects/ContentImage.tsx')
| -rw-r--r-- | src/ui/objects/ContentImage.tsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ui/objects/ContentImage.tsx b/src/ui/objects/ContentImage.tsx new file mode 100644 index 0000000..ef45f89 --- /dev/null +++ b/src/ui/objects/ContentImage.tsx | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | import type { ClassValue } from "corvos/deps/clsx.ts"; | ||
| 2 | import type { Props as ImageProps } from "corvos/plugins/images.ts"; | ||
| 3 | |||
| 4 | import { Image } from "corvos/plugins/images.ts"; | ||
| 5 | |||
| 6 | export type Props = Omit<ImageProps, "src"> & { | ||
| 7 | "src"?: string; | ||
| 8 | "img-class"?: ClassValue; | ||
| 9 | }; | ||
| 10 | |||
| 11 | export const ContentImage = ({ src, "img-class": imgClass, ...props }: Props) => ( | ||
| 12 | <a href={src} data-lightbox {...props}> | ||
| 13 | <Image src={src} width="1400" class:list={imgClass} /> | ||
| 14 | </a> | ||
| 15 | ); | ||
