about summary refs log tree commit diff
path: root/client/src/UI.elm
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-07-31T18·32+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-07-31T18·32+0100
commitcf5d211477daefd105f9cd8f59195cb4d538086e (patch)
tree17446c16c65bd1edc50626807c302c9fc60b0555 /client/src/UI.elm
parent4d30a80487fae26e9b0395270dec1a1792a67b6a (diff)
Support UI.disabledButton
While this isn't necessary, it tidies up the code a bit.
Diffstat (limited to 'client/src/UI.elm')
-rw-r--r--client/src/UI.elm12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/src/UI.elm b/client/src/UI.elm
index 28b73a8ae9fe..482c6ebe9dd8 100644
--- a/client/src/UI.elm
+++ b/client/src/UI.elm
@@ -124,6 +124,18 @@ simpleButton { label, handleClick } =
         }
 
 
+disabledButton :
+    { label : String }
+    -> Html State.Msg
+disabledButton { label } =
+    baseButton
+        { label = label
+        , enabled = False
+        , handleClick = State.DoNothing
+        , extraClasses = []
+        }
+
+
 textButton :
     { label : String
     , handleClick : msg