2021-04-12 06:18:30 +02:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
2021-05-30 19:46:39 +02:00
|
|
|
import { getContext } from "svelte";
|
|
|
|
import { nightModeKey } from "components/contextKeys";
|
|
|
|
|
2021-04-12 06:18:30 +02:00
|
|
|
export let choices: string[];
|
|
|
|
export let value: number = 0;
|
2021-05-30 19:46:39 +02:00
|
|
|
|
|
|
|
const nightMode = getContext<boolean>(nightModeKey);
|
2021-04-12 06:18:30 +02:00
|
|
|
</script>
|
|
|
|
|
2021-05-30 19:46:39 +02:00
|
|
|
<select bind:value class:visible-down-arrow={nightMode} class="form-select">
|
2021-05-28 00:52:49 +02:00
|
|
|
{#each choices as choice, idx}
|
|
|
|
<option value={idx}>{choice}</option>
|
|
|
|
{/each}
|
|
|
|
</select>
|
2021-05-30 19:46:39 +02:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@use "ts/sass/button_mixins" as button;
|
|
|
|
|
|
|
|
.visible-down-arrow {
|
|
|
|
/* override the default down arrow */
|
2021-06-05 00:40:55 +02:00
|
|
|
background-image: button.down-arrow(white);
|
2021-05-30 19:46:39 +02:00
|
|
|
}
|
|
|
|
</style>
|