aboutsummaryrefslogtreecommitdiff
path: root/src/components/select/select.vue
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2021-05-31 11:08:56 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2021-05-31 11:08:56 +0000
commit4e96af044224dc10b8cc4eb270e025f1b8a1d29a (patch)
treef713351d5e034f6b67fe51ece81c27af7dca1dae /src/components/select/select.vue
parentdc611dffdbf8f24c10caa7651651efbff1acfe67 (diff)
parentc03965646027bc8ce2d4c083ea3fd0423233fa18 (diff)
Merge branch 'better-selects' into 'develop'
Better <select> components See merge request pleroma/pleroma-fe!1373
Diffstat (limited to 'src/components/select/select.vue')
-rw-r--r--src/components/select/select.vue62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/components/select/select.vue b/src/components/select/select.vue
new file mode 100644
index 00000000..5ade1fa6
--- /dev/null
+++ b/src/components/select/select.vue
@@ -0,0 +1,62 @@
+
+<template>
+ <label
+ class="Select input"
+ :class="{ disabled, unstyled }"
+ >
+ <select
+ :disabled="disabled"
+ :value="value"
+ @change="$emit('change', $event.target.value)"
+ >
+ <slot />
+ </select>
+ <FAIcon
+ class="select-down-icon"
+ icon="chevron-down"
+ />
+ </label>
+</template>
+
+<script src="./select.js"> </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;
+ }
+
+ .select-down-icon {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ right: 5px;
+ height: 100%;
+ color: $fallback--text;
+ color: var(--inputText, $fallback--text);
+ line-height: 28px;
+ z-index: 0;
+ pointer-events: none;
+ }
+
+}
+</style>