aboutsummaryrefslogtreecommitdiff
path: root/src/Emoji.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Emoji.tsx')
-rw-r--r--src/Emoji.tsx19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Emoji.tsx b/src/Emoji.tsx
new file mode 100644
index 0000000..b928087
--- /dev/null
+++ b/src/Emoji.tsx
@@ -0,0 +1,19 @@
+import { FC } from 'react';
+import Image from 'next/future/image';
+
+interface Props {
+ children: string[];
+}
+
+const Emoji: FC<Props> = ({ children }) => {
+ const src = children[0];
+ return (
+ <Image
+ src={`/emoji/${src}`}
+ width={16}
+ alt={`${src}-emoji`}
+ />
+ );
+}
+
+export default Emoji;