aboutsummaryrefslogtreecommitdiff
path: root/src/components/select/select.vue
blob: a27a25410f4a5358c657589af6682f47800136ac (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>
  <label
    class="Select input"
    :class="{ disabled }"
  >
    <select
      :disabled="disabled"
      :value="value"
      @change="$emit('change', $event.target.value)"
    >
      <slot />
    </select>
    <FAIcon
      class="select-down-icon"
      icon="chevron-down"
    />
  </label>
</template>

<script>
import { library } from '@fortawesome/fontawesome-svg-core'
import {
  faChevronDown
} from '@fortawesome/free-solid-svg-icons'

library.add(
  faChevronDown
)
export default {
  model: {
    prop: 'value',
    event: 'change'
  },
  props: [
    'value',
    'disabled'
  ]
}
</script>

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

.Select {
  padding: 0;

  select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    color: $fallback--text;
    color: var(--inputText, --text, $fallback--text);
    margin: 0;
    padding: 0 2em 0 .2em;
    font-family: sans-serif;
    font-family: var(--inputFont, sans-serif);
    font-size: 14px;
    width: 100%;
    z-index: 1;
    height: 28px;
    line-height: 16px;
  }
}
</style>