From 36bbe64db012aaed7ff0fadf083f191b122fa4ad Mon Sep 17 00:00:00 2001
From: mat <github@matdoes.dev>
Date: Wed, 16 Feb 2022 00:07:13 -0600
Subject: add files

---
 src/lib/Emoji.svelte | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 src/lib/Emoji.svelte

(limited to 'src/lib/Emoji.svelte')

diff --git a/src/lib/Emoji.svelte b/src/lib/Emoji.svelte
new file mode 100644
index 0000000..0e8f4a7
--- /dev/null
+++ b/src/lib/Emoji.svelte
@@ -0,0 +1,25 @@
+<!-- 
+	@component
+	
+	All the emojis inside this component will be turned into Twemojis.
+-->
+<script lang="ts">
+	import { twemojiHtml } from './utils'
+
+	export let value: string
+</script>
+
+<span>
+	{@html twemojiHtml(value)}
+</span>
+
+<style>
+	:global(.emoji) {
+		position: relative;
+		/* we specify the width so it doesn't change size when the image shows up */
+		width: 1em;
+		height: 1em;
+		vertical-align: text-bottom;
+		bottom: 0.1em;
+	}
+</style>
-- 
cgit 

