diff options
author | mat <github@matdoes.dev> | 2022-02-16 00:07:13 -0600 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-02-16 00:07:13 -0600 |
commit | 36bbe64db012aaed7ff0fadf083f191b122fa4ad (patch) | |
tree | d4529a64a0e2e369a642f47c9f7ef791aaf4ea8e /src/lib | |
parent | 77679dbf69ae097cefbbcabe9c2b952d446e9677 (diff) | |
download | skyblock-stats-36bbe64db012aaed7ff0fadf083f191b122fa4ad.tar.gz skyblock-stats-36bbe64db012aaed7ff0fadf083f191b122fa4ad.tar.bz2 skyblock-stats-36bbe64db012aaed7ff0fadf083f191b122fa4ad.zip |
add files
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Emoji.svelte | 25 |
1 files changed, 25 insertions, 0 deletions
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> |