From 0a778160cc7842ebd4ddfe8059a3ef81526637a2 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 8 Jun 2019 17:15:42 +0300 Subject: [PATCH] styles --- src/App.scss | 47 ------------ src/components/emoji-input/emoji-input.js | 5 +- src/components/emoji-input/emoji-input.vue | 89 ++++++++++++++++++---- 3 files changed, 78 insertions(+), 63 deletions(-) diff --git a/src/App.scss b/src/App.scss index fd724979..e4f58e4e 100644 --- a/src/App.scss +++ b/src/App.scss @@ -806,50 +806,3 @@ nav { .btn.btn-default { min-height: 28px; } - -.autocomplete { - &-panel { - &-body { - margin: 0 0.5em 0 0.5em; - border-radius: $fallback--tooltipRadius; - border-radius: var(--tooltipRadius, $fallback--tooltipRadius); - box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5); - // this doesn't match original but i don't care, making it uniform. - box-shadow: var(--popupShadow); - min-width: 75%; - background: $fallback--bg; - background: var(--bg, $fallback--bg); - color: $fallback--lightText; - color: var(--lightText, $fallback--lightText); - } - } - - &-item { - cursor: pointer; - padding: 0.2em 0.4em 0.2em 0.4em; - border-bottom: 1px solid rgba(0, 0, 0, 0.4); - display: flex; - - img { - width: 24px; - height: 24px; - object-fit: contain; - } - - span { - line-height: 24px; - margin: 0 0.1em 0 0.2em; - } - - small { - margin-left: .5em; - color: $fallback--faint; - color: var(--faint, $fallback--faint); - } - - &.highlighted { - background-color: $fallback--fg; - background-color: var(--lightBg, $fallback--fg); - } - } -} diff --git a/src/components/emoji-input/emoji-input.js b/src/components/emoji-input/emoji-input.js index fb60d998..aae11a9b 100644 --- a/src/components/emoji-input/emoji-input.js +++ b/src/components/emoji-input/emoji-input.js @@ -37,9 +37,8 @@ const EmojiInput = { return false } return take(matchedSuggestions, 5) - .map(({ displayText, imageUrl, replacement }, index) => ({ - displayText, - replacement, + .map(({ imageUrl, ...rest }, index) => ({ + ...rest, // eslint-disable-next-line camelcase img: imageUrl || '', highlighted: index === this.highlighted diff --git a/src/components/emoji-input/emoji-input.vue b/src/components/emoji-input/emoji-input.vue index 0ca74322..dec71744 100644 --- a/src/components/emoji-input/emoji-input.vue +++ b/src/components/emoji-input/emoji-input.vue @@ -1,7 +1,7 @@