This commit is contained in:
Pieter Vander Vennet 2023-12-02 01:46:50 +01:00
parent 723a13b05f
commit c7089c27a0
5 changed files with 16 additions and 7 deletions

View file

@ -2704,6 +2704,10 @@ a.link-underline {
min-height: 8rem; min-height: 8rem;
} }
.max-w-full {
max-width: 100%;
}
.hover\:bg-indigo-200:hover { .hover\:bg-indigo-200:hover {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(199 210 254 / var(--tw-bg-opacity)); background-color: rgb(199 210 254 / var(--tw-bg-opacity));

View file

@ -29,10 +29,8 @@
</script> </script>
<div class="flex flex-col m-4"> <div class="flex flex-col m-4">
<div class="self-end"> <LanguagePicker clss="self-end" assignTo={state.language} availableLanguages={t.title.SupportedLanguages()}
<LanguagePicker assignTo={state.language} availableLanguages={t.title.SupportedLanguages()}
preferredLanguages={userLanguages} /> preferredLanguages={userLanguages} />
</div>
<div class="flex mt-4"> <div class="flex mt-4">

View file

@ -24,8 +24,9 @@
selectAppropriateValue() selectAppropriateValue()
} }
} }
export let cls : string = undefined
</script> </script>
<select bind:this={htmlElement} on:change={(e) => {value.setData(e.srcElement.value)}}> <select class={cls} bind:this={htmlElement} on:change={(e) => {value.setData(e.srcElement.value)}}>
<slot /> <slot />
</select> </select>

View file

@ -8,6 +8,7 @@
import Locale from "../i18n/Locale"; import Locale from "../i18n/Locale";
import { LanguageIcon } from "@babeard/svelte-heroicons/solid"; import { LanguageIcon } from "@babeard/svelte-heroicons/solid";
import Dropdown from "../Base/Dropdown.svelte"; import Dropdown from "../Base/Dropdown.svelte";
import { twMerge } from "tailwind-merge"
/** /**
* Languages one can choose from * Languages one can choose from
@ -33,13 +34,14 @@
let current = Locale.language; let current = Locale.language;
export let clss : string = undefined
</script> </script>
{#if availableLanguages?.length > 1} {#if availableLanguages?.length > 1}
<form class="flex items-center"> <form class={twMerge("flex items-center max-w-full pr-4", clss)}>
<LanguageIcon class="h-4 w-4 mr-1" /> <LanguageIcon class="h-4 w-4 mr-1 shrink-0" />
<Dropdown value={assignTo}> <Dropdown cls="max-w-full" value={assignTo}>
{#if preferredFiltered} {#if preferredFiltered}
{#each preferredFiltered as language} {#each preferredFiltered as language}
<option value={language} class="font-bold"> <option value={language} class="font-bold">

View file

@ -637,3 +637,7 @@ a.link-underline {
.min-h-32 { .min-h-32 {
min-height: 8rem; min-height: 8rem;
} }
.max-w-full {
max-width: 100%;
}