fix: make settings page usable
This commit is contained in:
1 parent
0718c8e0c6
commit
d670f39f0a
11 files changed
+47
-60
No files matched your search
@@ -50,14 +50,14 @@
|
||||
transition:scale={{ opacity: 0, start: 0.3 }}
|
||||
style="grid-row: 1; grid-column: 1;"
|
||||
>
|
||||
<Icon src={Clipboard} size="16" slot="prefix" />
|
||||
<Icon src={Clipboard} size="16" />
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
transition:scale={{ opacity: 0, start: 0.3 }}
|
||||
style="grid-row: 1; grid-column: 1;"
|
||||
>
|
||||
<Icon src={Check} size="16" mini slot="prefix" />
|
||||
<Icon src={Check} size="16" mini />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
class="top-0 left-0"
|
||||
style="grid-row: 1; grid-column: 1;"
|
||||
>
|
||||
<Icon src={Clipboard} size="18" mini slot="prefix" />
|
||||
<Icon src={Clipboard} size="18" mini />
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
@@ -48,7 +48,7 @@
|
||||
class="top-0 left-0"
|
||||
style="grid-row: 1; grid-column: 1;"
|
||||
>
|
||||
<Icon src={Check} size="18" mini slot="prefix" />
|
||||
<Icon src={Check} size="18" mini />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -1,41 +1,45 @@
|
||||
<script lang="ts">
|
||||
export let defaultValue: boolean = false
|
||||
export let checked: boolean = defaultValue
|
||||
export let defaultValue: boolean = false
|
||||
export let checked: boolean = defaultValue
|
||||
|
||||
export let labelClass: string = ''
|
||||
export let labelClass: string = ''
|
||||
let clazz: string = ''
|
||||
export { clazz as class }
|
||||
</script>
|
||||
|
||||
<label class="font-normal cursor-pointer flex flex-row items-start gap-4 group {class}">
|
||||
<div
|
||||
class="w-11 h-6 rounded-full relative z-[inherit] cursor-pointer flex flex-row transition-colors shadow-sm
|
||||
{checked ? 'bg-primary-900 dark:bg-primary-100' : 'bg-slate-200 dark:bg-zinc-800'}
|
||||
<label
|
||||
class="font-normal cursor-pointer flex flex-row items-start gap-4 group {clazz}"
|
||||
>
|
||||
<div
|
||||
class="w-11 h-6 rounded-full relative z-[inherit] cursor-pointer flex flex-row transition-colors shadow-sm
|
||||
{checked
|
||||
? 'bg-primary-900 dark:bg-primary-100'
|
||||
: 'bg-slate-200 dark:bg-zinc-800'}
|
||||
p-0.5 flex-shrink-0"
|
||||
>
|
||||
<input
|
||||
bind:checked
|
||||
type="checkbox"
|
||||
class="peer appearance-none absolute top-0 left-0 w-full h-full cursor-pointer z-10"
|
||||
/>
|
||||
<div
|
||||
class="box-border w-5 h-full bg-white peer-checked:dark:bg-black rounded-full shadow-sm
|
||||
>
|
||||
<input
|
||||
bind:checked
|
||||
type="checkbox"
|
||||
class="peer appearance-none absolute top-0 left-0 w-full h-full cursor-pointer z-10"
|
||||
/>
|
||||
<div
|
||||
class="box-border w-5 h-full bg-white peer-checked:dark:bg-black rounded-full shadow-sm
|
||||
group-active:w-6 transition peer-checked:translate-x-5 group-active:peer-checked:translate-x-4
|
||||
rtl:peer-checked:-translate-x-5 rtl:group-active:peer-checked:-translate-x-4"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col {labelClass}">
|
||||
<slot />
|
||||
{#if $$slots.description}
|
||||
<span class="font-normal text-sm text-slate-700 dark:text-zinc-300">
|
||||
<slot name="description" />
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col {labelClass}">
|
||||
<slot />
|
||||
{#if $$slots.description}
|
||||
<span class="font-normal text-sm text-slate-700 dark:text-zinc-300">
|
||||
<slot name="description" />
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<style>
|
||||
.transition {
|
||||
transition: all 500ms cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||
}
|
||||
.transition {
|
||||
transition: all 500ms cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||
}
|
||||
</style>
|
||||
@@ -32,7 +32,7 @@
|
||||
color={action.type}
|
||||
>
|
||||
{#if action.icon}
|
||||
<Icon src={action.icon} mini size="16" slot="prefix" />
|
||||
<Icon src={action.icon} mini size="16" />
|
||||
{/if}
|
||||
{action.content}
|
||||
</Button>
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
}}
|
||||
{...$$restProps}
|
||||
inlineAffixes
|
||||
slot="target"
|
||||
>
|
||||
<div slot="prefix" class="h-5 flex items-center">
|
||||
<Icon src={MagnifyingGlass} mini size="16" />
|
||||
|
||||
Reference in new issue
Block a user