jabaraster / elm-views / Views

view components.

view components


type IconKind
    = Redo
    | Plus
    | Minus
    | Filter
    | Search
    | Pen
    | Trash
    | ArrowRight
    | Check
    | Save
    | Download
    | Eye
    | User
    | Home
    | Globe
    | ExternalLinkAlt
    | Image
    | Bars
    | WindowClose

icon kind. cf) font awesome |


type alias InputArg msg =
{ value : String
, label : String
, placeholder : String
, type_ : String
, attributes : List (Html.Styled.Attribute msg) 
}

'input' function arguments. |


type alias SelectedFile =
{ file : Maybe File
, url : String 
}

selected file struct.


type ViewElement msg
    = Tag (Html.Styled.Html msg)
    | Tags (List (Html.Styled.Html msg))
    | Empty

'build' function arguments.

backdrop : List (Html.Styled.Attribute msg) -> List (Html.Styled.Html msg) -> Html.Styled.Html msg

backdrop. ex) modal dialog back. |

build : List (ViewElement msg) -> List (Html.Styled.Html msg)

complexity tag builder.

concatClass : List String -> Html.Styled.Attribute msg

concat class attributes. |

defaultInputArg : InputArg msg

default input arg. |

defaultTextAreaArg : TextAreaArg msg

default textarea arg.

dialog : { body : List (Html.Styled.Html msg), headerElements : List (Html.Styled.Html msg), footerElements : List (Html.Styled.Html msg) } -> Html.Styled.Html msg

modal dialog by

tag.

dialogConfirmation : { title : String, cancel : msg, ok : msg, body : List (Html.Styled.Html msg) } -> Html.Styled.Html msg

simple ok/cancel dialog. |

icon : IconKind -> Html.Styled.Html msg

only icon. |

iconButton : IconKind -> List (Html.Styled.Attribute msg) -> Html.Styled.Html msg

button with icon. |

iconButtonText : IconKind -> String -> List (Html.Styled.Attribute msg) -> Html.Styled.Html msg

button with icon and text. |

iconS : String -> Html.Styled.Html msg

small icon. |

imageSelector : msg -> Maybe SelectedFile -> Html.Styled.Html msg

image selector. |

input : (InputArg msg -> InputArg msg) -> (String -> msg) -> Html.Styled.Html msg

input component. |

input2 : Input2RequiredArg msg -> (Input2OptionalArg msg -> Input2OptionalArg msg) -> Html.Styled.Html msg

input component. |

inputUnderLine : List (Html.Styled.Attribute msg) -> List (Html.Styled.Html msg) -> Html.Styled.Html msg

underlined input component. |

oneColumn : Html.Styled.Html msg -> Html.Styled.Html msg

only one column row. |

oneColumnNoTBMargin : Html.Styled.Html msg -> Html.Styled.Html msg

one column no top and bottom margin. |

oneColumnNoTopMargin : Html.Styled.Html msg -> Html.Styled.Html msg

one column no top margin. |

select : { value : Maybe a, values : List a, valueToString : a -> String, valueToLabel : a -> String, handler : String -> msg, attributes : List (Html.Styled.Attribute msg) } -> Html.Styled.Html msg

select component. |

submitter : msg -> Basics.Bool -> String -> Html.Styled.Html msg

loading button. |

switch : { value : Basics.Bool, onClick : msg } -> Html.Styled.Html msg

toggle button. |

textArea : (TextAreaArg msg -> TextAreaArg msg) -> (String -> msg) -> Html.Styled.Html msg

textarea component. |

twoColumns : Html.Styled.Html msg -> Html.Styled.Html msg -> Html.Styled.Html msg

two columns row. |