pleroma-fe/src/components/select/select.vue

63 lines
1.2 KiB
Vue
Raw Normal View History

<template>
<label
class="Select input"
2021-03-11 15:31:15 +01:00
:class="{ disabled, unstyled }"
>
<select
:disabled="disabled"
2022-03-21 21:00:25 +01:00
:value="modelValue"
2023-01-21 22:28:33 +01:00
v-bind="attrs"
2022-03-21 21:00:25 +01:00
@change="$emit('update:modelValue', $event.target.value)"
>
<slot />
</select>
2022-03-23 15:15:05 +01:00
{{ ' ' }}
<FAIcon
class="select-down-icon"
icon="chevron-down"
/>
</label>
</template>
2021-03-11 15:19:11 +01:00
<script src="./select.js"> </script>
<style lang="scss">
2023-01-09 19:02:16 +01:00
@import "../../variables";
2022-03-17 08:06:05 +01:00
/* TODO fix order of styles */
label.Select {
padding: 0;
select {
appearance: none;
background: transparent;
border: none;
color: $fallback--text;
color: var(--inputText, --text, $fallback--text);
margin: 0;
2023-01-09 19:02:16 +01:00
padding: 0 2em 0 0.2em;
font-family: sans-serif;
font-family: var(--inputFont, sans-serif);
2022-04-20 22:22:51 +02:00
font-size: 1em;
width: 100%;
z-index: 1;
2022-04-20 22:22:51 +02:00
height: 2em;
line-height: 16px;
}
2021-03-11 15:31:15 +01:00
.select-down-icon {
position: absolute;
top: 0;
bottom: 0;
right: 5px;
height: 100%;
2022-03-15 20:00:52 +01:00
width: 0.875em;
2021-03-11 15:31:15 +01:00
color: $fallback--text;
color: var(--inputText, $fallback--text);
2022-04-20 22:22:51 +02:00
line-height: 2;
2021-03-11 15:31:15 +01:00
z-index: 0;
pointer-events: none;
}
}
</style>