Formatting. Added demo stickers as emojis. Added TODOs.

This commit is contained in:
Lucid Kobold
2022-01-06 12:01:22 -06:00
parent d279d7fb84
commit 6926066751
4 changed files with 78 additions and 47 deletions

View File

@@ -0,0 +1,45 @@
import React, { FC } from "react";
// TODO: When themes are made import the theme from user settings context. Refactor to use whatever those SVGs are.
interface DemoStickersProps {
stickerVal: 2 | 1 | 0 | -1 | -2;
}
const DemoStickers: FC<DemoStickersProps> = ({
stickerVal
}: DemoStickersProps) => {
interface StickerToEmoji {
[key: string]: JSX.Element;
}
let key = "0";
if (stickerVal > 0) {
key = "1";
} else if (stickerVal < 0) {
key = "-1";
}
const stickerToEmoji: StickerToEmoji = {
"1": (
<span role="img" aria-label="Sun">
</span>
),
"0": (
<span role="img" aria-label="Cloud">
</span>
),
"-1": (
<span role="img" aria-label="Raining Cloud">
🌧
</span>
)
};
return stickerToEmoji[`${key}`];
};
export default DemoStickers;