y200subcontrols 0.0.362 → 0.0.363
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,8 +5,8 @@ export let size = "md";
|
|
|
5
5
|
<span
|
|
6
6
|
class="inline-block text-center
|
|
7
7
|
{size === 'sm' ? 'text-sm rounded px-3 py-1.5' : ''}
|
|
8
|
-
{size === 'md' ? 'text-base rounded-
|
|
9
|
-
{size === 'lg' ? 'text-lg rounded-
|
|
8
|
+
{size === 'md' ? 'text-base rounded-lg px-4 py-2' : ''}
|
|
9
|
+
{size === 'lg' ? 'text-lg rounded-xl px-6 py-3' : ''}
|
|
10
10
|
{theme === 'teal' ? 'bg-teal-500 text-teal-50' : ''}
|
|
11
11
|
{theme === 'slate' ? 'bg-slate-400 text-slate-50' : ''}
|
|
12
12
|
{theme === 'blue' ? 'bg-blue-600 text-blue-50' : ''}
|
|
@@ -3,15 +3,17 @@ export let label = "";
|
|
|
3
3
|
export let id = void 0;
|
|
4
4
|
export let name = void 0;
|
|
5
5
|
export let theme = "teal";
|
|
6
|
+
export let disabled = false;
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<label class="flex cursor-pointer">
|
|
9
|
-
<input type="checkbox" bind:checked class="hidden peer" {id} {name} on:change />
|
|
10
|
+
<input type="checkbox" bind:checked class="hidden peer" {id} {name} on:change {disabled} />
|
|
10
11
|
<div
|
|
11
12
|
class=" rounded-full h-5 w-10 flex my-auto bg-slate-300
|
|
12
|
-
{theme==='teal' ? 'peer-checked:bg-teal-600' : ''}
|
|
13
|
-
{theme==='indigo' ? 'peer-checked:bg-indigo-600' : ''}
|
|
14
|
-
{theme==='blue' ? 'peer-blue:bg-indigo-600' : ''}
|
|
13
|
+
{theme === 'teal' ? 'peer-checked:bg-teal-600' : ''}
|
|
14
|
+
{theme === 'indigo' ? 'peer-checked:bg-indigo-600' : ''}
|
|
15
|
+
{theme === 'blue' ? 'peer-blue:bg-indigo-600' : ''}
|
|
16
|
+
peer-disabled:bg-slate-100
|
|
15
17
|
|
|
16
18
|
transition-all duration-300"
|
|
17
19
|
>
|
|
@@ -19,6 +21,7 @@ export let theme = "teal";
|
|
|
19
21
|
class="w-5 h-5 rounded-full my-auto border border-slate-400 {!checked
|
|
20
22
|
? 'bg-slate-400 translate-x-0'
|
|
21
23
|
: ' translate-x-5 bg-slate-100 '} transition-all ease-in-out duration-300
|
|
24
|
+
|
|
22
25
|
"
|
|
23
26
|
/>
|
|
24
27
|
</div>
|