aboutsummaryrefslogtreecommitdiff
path: root/src/components/sticker_picker/sticker_picker.vue
blob: 904853c0d02ad3c5eb057c92ad5cdd13238a0613 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
  <div
    class="sticker-picker"
  >
    <tab-switcher
      class="tab-switcher"
      :render-only-focused="true"
      scrollable-tabs
    >
      <div
        v-for="stickerpack in pack"
        :key="stickerpack.path"
        :image-tooltip="stickerpack.meta.title"
        :image="stickerpack.path + stickerpack.meta.tabIcon"
        class="sticker-picker-content"
      >
        <div
          v-for="sticker in stickerpack.meta.stickers"
          :key="sticker"
          class="sticker"
          @click.stop.prevent="pick(stickerpack.path + sticker, stickerpack.meta.title)"
        >
          <img
            :src="stickerpack.path + sticker"
          >
        </div>
      </div>
    </tab-switcher>
  </div>
</template>

<script src="./sticker_picker.js"></script>

<style lang="scss">
@import "../../variables";

.sticker-picker {
  width: 100%;

  .contents {
    min-height: 250px;

    .sticker-picker-content {
      display: flex;
      flex-wrap: wrap;
      padding: 0 4px;

      .sticker {
        display: flex;
        flex: 1 1 auto;
        margin: 4px;
        width: 56px;
        height: 56px;

        img {
          height: 100%;

          &:hover {
            filter: drop-shadow(0 0 5px var(--accent, $fallback--link));
          }
        }
      }
    }
  }
}

</style>