Fix more stuff, particularly event handlers

This commit is contained in:
Jon Staab
2025-02-03 17:21:46 -08:00
parent 8d3433b167
commit 24045a7e2a
150 changed files with 424 additions and 392 deletions
+5 -5
View File
@@ -22,15 +22,15 @@
active?: boolean
}
let {score, max = 100, active = false}: Props = $props()
const {score, max = 100, active = false}: Props = $props()
const radius = 6
const center = radius + 1
let normalizedScore = $derived(clamp([0, max], score) / max)
let dashOffset = $derived(100 - 44 * normalizedScore)
let style = $derived(`transform: rotate(${135 - normalizedScore * 180}deg)`)
let stroke = $derived(active ? "var(--primary)" : "var(--base-content)")
const normalizedScore = $derived(clamp([0, max], score) / max)
const dashOffset = $derived(100 - 44 * normalizedScore)
const style = $derived(`transform: rotate(${135 - normalizedScore * 180}deg)`)
const stroke = $derived(active ? "var(--primary)" : "var(--base-content)")
</script>
<div class="relative h-[14px] w-[14px]">