1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 08:31:59 +00:00

fix(web): slider (#6485)

This commit is contained in:
Jason Rasmussen 2024-01-19 09:57:15 -05:00 committed by GitHub
parent b4d1470586
commit dacca4cdf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 33 additions and 33 deletions

View file

@ -13,7 +13,8 @@
const dispatch = createEventDispatcher<{ toggle: boolean }>();
</script>
<Slider bind:checked {disabled} on:toggle={() => dispatch('toggle', checked)}>
<div class="flex place-items-center justify-between">
<div>
<div class="flex h-[26px] place-items-center gap-1">
<label class="font-medium text-immich-primary dark:text-immich-dark-primary text-sm" for={title}>
{title}
@ -29,4 +30,6 @@
</div>
<p class="text-sm dark:text-immich-dark-fg">{subtitle}</p>
</Slider>
</div>
<Slider bind:checked {disabled} on:toggle={() => dispatch('toggle', checked)} />
</div>

View file

@ -8,9 +8,7 @@
const onToggle = (event: Event) => dispatch('toggle', (event.target as HTMLInputElement).checked);
</script>
<div class="flex place-items-center justify-between">
<slot name="leading" />
<label class="relative inline-block h-[10px] w-[36px] flex-none">
<label class="relative inline-block h-[10px] w-[36px] flex-none">
<input
class="disabled::cursor-not-allowed h-0 w-0 opacity-0"
type="checkbox"
@ -24,8 +22,7 @@
{:else}
<span class="slider slider-enabled cursor-pointer" />
{/if}
</label>
</div>
</label>
<style>
.slider {