module Form.Input ( input, ) where import Data.Text qualified as T import Form.Internal import Miso import Miso.String (fromMisoString, toMisoString) input :: String -> Form T.Text T.Text input label = Form { view = \i -> [ div_ [] $ [ label_ [] $ [ text (toMisoString label), input_ [ type_ "text", value_ (toMisoString i), onInput fromMisoString ] ] ] ], fill = \i -> Right i }