From 5960d45be13051c377e1b2a3a87f492e6c18201e Mon Sep 17 00:00:00 2001 From: Nathan Morrison Date: Sun, 10 Nov 2024 06:53:09 -0600 Subject: [PATCH] Fix toggle button label I missed labeling "off" for the off state. Now not just the color will specify the state. --- src/Command/Components.elm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Command/Components.elm b/src/Command/Components.elm index 6c3eceb..795c067 100644 --- a/src/Command/Components.elm +++ b/src/Command/Components.elm @@ -94,10 +94,12 @@ toggle label sendToggle current then (Css.rgb 0 128 0) else (Css.rgb 128 0 0) ] + labelText + = if current then "on" else "off" in [ HS.h4 [] [HS.text label] - , HS.button [HSE.onClick sendToggle, pressed, style] [HS.text "on"] + , HS.button [HSE.onClick sendToggle, pressed, style] [HS.text labelText] ] {-| A list of choices as a dropdown -}