web/settings: convert LanguageDropdown to universal SettingsDropdown

This commit is contained in:
wukko
2024-10-28 21:42:07 +06:00
parent 17c020fe22
commit 3a0b0fed8b
3 changed files with 69 additions and 39 deletions

View File

@@ -39,16 +39,14 @@
updateSetting({
[settingContext]: {
[settingId]: !isEnabled,
},
})}
}
})
}
>
<h4 class="toggle-title">{title}</h4>
<Toggle enabled={isEnabled} />
</button>
<!--
description is repeated here because there may be several toggles per settings category,
and each of them needs its own description. this is intended. don't "clean it up".
-->
{#if description}
<div class="subtext toggle-description">{description}</div>
{/if}