move to svelte kit
Some checks failed
ESP-IDF Build / build (esp32c6, release-v5.4) (push) Failing after 2m4s
ESP-IDF Build / build (esp32c6, release-v5.5) (push) Failing after 4m23s
ESP-IDF Build / build (esp32s3, release-v5.4) (push) Failing after 1m53s
ESP-IDF Build / build (esp32s3, release-v5.5) (push) Failing after 4m16s
Some checks failed
ESP-IDF Build / build (esp32c6, release-v5.4) (push) Failing after 2m4s
ESP-IDF Build / build (esp32c6, release-v5.5) (push) Failing after 4m23s
ESP-IDF Build / build (esp32s3, release-v5.4) (push) Failing after 1m53s
ESP-IDF Build / build (esp32s3, release-v5.5) (push) Failing after 4m16s
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
37
firmware/website.bak/src/compoents/Toggle.svelte
Normal file
37
firmware/website.bak/src/compoents/Toggle.svelte
Normal file
@@ -0,0 +1,37 @@
|
||||
<script lang="ts">
|
||||
const { label, icon, ariaLabel, onClick } = $props<{
|
||||
label: string;
|
||||
icon: string;
|
||||
ariaLabel: string;
|
||||
onClick?: () => void;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<button class="toggle" aria-label={ariaLabel} onclick={onClick}>
|
||||
<span class="icon" id="icon">{icon}</span>
|
||||
<span class="label" id="label">{label}</span>
|
||||
</button>
|
||||
|
||||
<style>
|
||||
.toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: var(--card-bg);
|
||||
padding: 8px 12px;
|
||||
border-radius: 20px;
|
||||
border: 1px solid var(--border);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.toggle:hover {
|
||||
border-color: var(--success);
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user