From 4d30a80487fae26e9b0395270dec1a1792a67b6a Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 31 Jul 2020 19:32:14 +0100 Subject: [PATCH] Support UI.textButton Create a text-only button. --- client/src/UI.elm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/client/src/UI.elm b/client/src/UI.elm index 565771e21..28b73a8ae 100644 --- a/client/src/UI.elm +++ b/client/src/UI.elm @@ -124,6 +124,26 @@ simpleButton { label, handleClick } = } +textButton : + { label : String + , handleClick : msg + } + -> Html msg +textButton { label, handleClick } = + button + [ [ "text-blue-600" + , "hover:text-blue-500" + , "font-bold" + , "hover:underline" + , "focus:outline-none" + ] + |> Tailwind.use + |> class + , onClick handleClick + ] + [ text label ] + + textField : { pholder : String , inputId : String