aboutsummaryrefslogtreecommitdiff
path: root/lume/src/_components/XeblogSticker.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lume/src/_components/XeblogSticker.tsx')
-rw-r--r--lume/src/_components/XeblogSticker.tsx31
1 files changed, 15 insertions, 16 deletions
diff --git a/lume/src/_components/XeblogSticker.tsx b/lume/src/_components/XeblogSticker.tsx
index 713cad2..8a4a747 100644
--- a/lume/src/_components/XeblogSticker.tsx
+++ b/lume/src/_components/XeblogSticker.tsx
@@ -1,29 +1,28 @@
export interface XeblogStickerProps {
name: string;
mood: string;
+ maxHeight?: string | null;
}
-export default function XeblogSticker({ name, mood }: XeblogStickerProps) {
+export default function XeblogSticker({
+ name,
+ mood,
+ maxHeight = null,
+}: XeblogStickerProps) {
const nameLower = name.toLowerCase();
name = name.replace(" ", "_");
+ if (maxHeight === null) {
+ maxHeight = "12rem";
+ }
return (
<>
- <picture>
- <source
- type="image/avif"
- srcset={`https://cdn.xeiaso.net/file/christine-static/stickers/${nameLower}/${mood}.avif`}
- />
- <source
- type="image/webp"
- srcset={`https://cdn.xeiaso.net/file/christine-static/stickers/${nameLower}/${mood}.webp`}
- />
- <img
- alt={`${name} is ${mood}`}
- loading="lazy"
- src={`https://cdn.xeiaso.net/file/christine-static/stickers/${nameLower}/${mood}.png`}
- />
- </picture>
+ <img
+ style={`max-height:${maxHeight}`}
+ alt={`${name} is ${mood}`}
+ loading="lazy"
+ src={`https://stickers.xeiaso.net/sticker/${nameLower}/${mood}`}
+ />
</>
);
}