From cf5d211477daefd105f9cd8f59195cb4d538086e Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 31 Jul 2020 19:32:30 +0100 Subject: [PATCH] Support UI.disabledButton While this isn't necessary, it tidies up the code a bit. --- client/src/UI.elm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/src/UI.elm b/client/src/UI.elm index 28b73a8ae..482c6ebe9 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