From 2c4e80aab3946e6a16b0768d45723f4ff8e47f72 Mon Sep 17 00:00:00 2001
From: jared <jaredrmain@gmail.com>
Date: Fri, 29 Mar 2019 11:49:32 -0400
Subject: #101 - add emoji selector basic mockup

---
 src/components/emoji-selector/emoji-selector.vue | 65 ++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 src/components/emoji-selector/emoji-selector.vue

(limited to 'src/components/emoji-selector/emoji-selector.vue')

diff --git a/src/components/emoji-selector/emoji-selector.vue b/src/components/emoji-selector/emoji-selector.vue
new file mode 100644
index 00000000..ebacc0c4
--- /dev/null
+++ b/src/components/emoji-selector/emoji-selector.vue
@@ -0,0 +1,65 @@
+<template>
+  <div class="emoji-dropdown">
+    <span class="emoji-dropdown-toggle" @click="togglePanel">Emoji</span>
+    <div class="emoji-dropdown-menu" v-if="open">
+      <span v-for="emoji in standardEmoji" :key="'standard' + emoji.shortcode" :title="emoji.shortcode" class="emoji-item">
+        <span v-if="!emoji.image_url">{{emoji.utf}}</span>
+        <img :src="emoji.utf" v-else>
+      </span>
+      <span v-for="emoji in customEmoji" :key="'custom' + emoji.shortcode" :title="emoji.shortcode" class="emoji-item">
+        <span v-if="!emoji.image_url">{{emoji.utf}}</span>
+        <img :src="'https://bikeshed.party' + emoji.image_url" v-else>
+      </span>
+    </div>
+  </div>
+</template>
+
+<script src="./emoji-selector.js"></script>
+
+<style lang="scss">
+@import '../../_variables.scss';
+
+.emoji {
+  &-dropdown {
+    position: relative;
+
+    &-toggle {
+      cursor: pointer;
+    }
+
+    &-menu {
+      position: absolute;
+      z-index: 1;
+      right: 0;
+      width: 300px;
+      height: 300px;
+      background: white;
+      border: 1px solid $fallback--faint;
+      display: flex;
+      align-items: center;
+      flex-wrap: wrap;
+      overflow: auto;
+      margin-bottom: 5px;
+
+      img {
+        max-width: 100%;
+        max-height: 100%;
+      }
+    }
+  }
+
+  &-item {
+    width: 34px;
+    height: 34px;
+    box-sizing: border-box;
+    display: flex;
+    font-size: 16px;
+    align-items: center;
+    justify-content: center;
+    color: black;
+    padding: 5px;
+    cursor: pointer;
+  }
+
+}
+</style>
-- 
cgit v1.2.3-70-g09d2

