aboutsummaryrefslogtreecommitdiff
path: root/src/components/poll/poll_form.vue
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2021-03-11 16:11:44 +0200
committerHenry Jameson <me@hjkos.com>2021-03-11 16:11:44 +0200
commitc6d4c20982261b55b16dda59c3e657eb1feb0041 (patch)
tree1c3051d5c1ce59b02cb2eaaac78a05835c20250e /src/components/poll/poll_form.vue
parent6281241b92bc17a9535b15a52e656b9f218e3322 (diff)
Made Select component to make using styled selects easier
Diffstat (limited to 'src/components/poll/poll_form.vue')
-rw-r--r--src/components/poll/poll_form.vue51
1 files changed, 18 insertions, 33 deletions
diff --git a/src/components/poll/poll_form.vue b/src/components/poll/poll_form.vue
index c4403210..f10d1550 100644
--- a/src/components/poll/poll_form.vue
+++ b/src/components/poll/poll_form.vue
@@ -46,23 +46,13 @@
class="poll-type"
:title="$t('polls.type')"
>
- <label
- for="poll-type-selector"
- class="select"
+ <Select
+ v-model="pollType"
+ @change="updatePollToParent"
>
- <select
- v-model="pollType"
- class="select"
- @change="updatePollToParent"
- >
- <option value="single">{{ $t('polls.single_choice') }}</option>
- <option value="multiple">{{ $t('polls.multiple_choices') }}</option>
- </select>
- <FAIcon
- class="select-down-icon"
- icon="chevron-down"
- />
- </label>
+ <option value="single">{{ $t('polls.single_choice') }}</option>
+ <option value="multiple">{{ $t('polls.multiple_choices') }}</option>
+ </Select>
</div>
<div
class="poll-expiry"
@@ -76,24 +66,19 @@
:max="maxExpirationInCurrentUnit"
@change="expiryAmountChange"
>
- <label class="expiry-unit select">
- <select
- v-model="expiryUnit"
- @change="expiryAmountChange"
+ <Select
+ v-model="expiryUnit"
+ class="expiry-unit"
+ @change="expiryAmountChange"
+ >
+ <option
+ v-for="unit in expiryUnits"
+ :key="unit"
+ :value="unit"
>
- <option
- v-for="unit in expiryUnits"
- :key="unit"
- :value="unit"
- >
- {{ $t(`time.${unit}_short`, ['']) }}
- </option>
- </select>
- <FAIcon
- class="select-down-icon"
- icon="chevron-down"
- />
- </label>
+ {{ $t(`time.${unit}_short`, ['']) }}
+ </option>
+ </Select>
</div>
</div>
</div>