Skip to content

Commit

Permalink
💄 Show emoji in crate dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaHuhn committed Aug 27, 2021
1 parent a27b2c7 commit edb91e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/components/Modal/AddLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
v-model="selectedCrate"
:reduce="item => item.id"
:options="crates"
label="name"
:get-option-label="(crate) => `${ emojiIcon(crate.icon) } ${ crate.name }`"
placeholder="Select a crate (optional)"
@open="isOpen = true"
@close="closeDropdown"
Expand All @@ -24,6 +24,8 @@
</template>

<script>
import emojis from '@/../server/utils/emojis'
export default {
data() {
return {
Expand Down Expand Up @@ -59,6 +61,9 @@ export default {
this.inputValue = undefined
},
methods: {
emojiIcon(name) {
return emojis[name]
},
add() {
const url = this.inputValue
if (!url) {
Expand Down

0 comments on commit edb91e8

Please sign in to comment.