Elm in Action by Richard Feldman

Elm in Action by Richard Feldman

Author:Richard Feldman
Language: eng
Format: mobi, epub
Publisher: Manning Publications
Published: 2020-04-15T11:53:46.117000+00:00


viewThumbnail : String -> Photo -> Html Msg

viewThumbnail selectedUrl thumb =

img

[ src (urlPrefix ++ thumb.url)

, title (thumb.title ++ " [" ++ String.fromInt thumb.size ++ " KB]")

, classList [ ( "selected", selectedUrl == thumb.url ) ]

, onClick (ClickedPhoto thumb.url)

]

[]

viewSizeChooser : ThumbnailSize -> Html Msg

viewSizeChooser size =

label []

[ input [ type_ "radio", name "size", onClick (ClickedSize size) ] []

, text (sizeToString size)

]

sizeToString : ThumbnailSize -> String

sizeToString size =

case size of

Small ->

"small"



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.