Bulma.Form
Bulma form
field : List (Attribute msg) -> List (Html msg) -> Html msg
button : List (Attribute msg) -> List (Html msg) -> Html msg
control : List (Attribute msg) -> List (Html msg) -> Html msg
fieldBody : List (Attribute msg) -> List (Html msg) -> Html msg
fieldLabel : List (Attribute msg) -> String -> Html msg
input : List (Attribute msg) -> Html msg
label : String -> Html msg
select : List (Attribute msg) -> List (Html msg) -> Html msg
textarea : List (Attribute msg) -> List (Html msg) -> Html msg
module Bulma.Form
exposing
( button
, control
, field
, fieldBody
, fieldLabel
, input
, label
, select
, textarea
)
{-| [Bulma form](http://bulma.io/documentation/form/general/)
@docs field, button, control, fieldBody, fieldLabel, input, label, select, textarea
-}
import Bulma.Util exposing (bulmaNode)
import Html exposing (Html, Attribute, div, text)
import Html.Attributes exposing (class)
{-| [`<button class="button">`](http://bulma.io/documentation/form/general/)
-}
button : List (Attribute msg) -> List (Html msg) -> Html msg
button =
bulmaNode Html.button "button"
{-| [`<p class="control">`](http://bulma.io/documentation/form/general/)
-}
control : List (Attribute msg) -> List (Html msg) -> Html msg
control =
bulmaNode div {- or p? -} "control"
{-| [`<div class="field">`](http://bulma.io/documentation/form/general/)
-}
field : List (Attribute msg) -> List (Html msg) -> Html msg
field =
bulmaNode div "field"
{-| [`<div class="field-body">`](http://bulma.io/documentation/form/general/)
-}
fieldBody : List (Attribute msg) -> List (Html msg) -> Html msg
fieldBody =
bulmaNode div "field-body"
{-| [`<div class="field-label" attributes...>str</div>`](http://bulma.io/documentation/form/general/)
-}
fieldLabel : List (Attribute msg) -> String -> Html msg
fieldLabel attributes str =
div (class "field-label" :: attributes) [ label str ]
{-| [`<input class="input">`](http://bulma.io/documentation/form/input/)
-}
input : List (Attribute msg) -> Html msg
input attributes =
Html.input (class "input" :: attributes) []
{-| [`<label class="label">str</label>`](http://bulma.io/documentation/form/general/)
-}
label : String -> Html msg
label str =
Html.label [ class "label" ] [ text str ]
{-| [`<div class="select">`](http://bulma.io/documentation/form/select/)
-}
select : List (Attribute msg) -> List (Html msg) -> Html msg
select =
bulmaNode div "select"
{-| [`<textarea class="textarea">`](http://bulma.io/documentation/form/textarea/)
-}
textarea : List (Attribute msg) -> List (Html msg) -> Html msg
textarea =
bulmaNode Html.textarea "textarea"