mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-28 07:52:32 +03:00
final
This commit is contained in:
25
src/widgets/Toggle.svelte
Normal file
25
src/widgets/Toggle.svelte
Normal file
@@ -0,0 +1,25 @@
|
||||
<script context="module">
|
||||
import { WSpush } from "../App.svelte";
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export let widget;
|
||||
</script>
|
||||
|
||||
<div class="card-items">
|
||||
<div class="w-2/3">
|
||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
||||
<label class="widget-descr-gray">{!widget.descr ? "" : widget.descr}</label>
|
||||
</div>
|
||||
<div class="w-1/3">
|
||||
<div class="flex items-center justify-center w-full">
|
||||
<label for="toggleB" class="items-center cursor-pointer">
|
||||
<div class="relative">
|
||||
<input id="toggleB" type="checkbox" class="sr-only" />
|
||||
<div class="block bg-gray-600 w-14 h-8 rounded-full" />
|
||||
<div class="dot absolute left-1 top-1 bg-white w-6 h-6 rounded-full transition" />
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user