Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Last active Apr 12, 2016
Embed
What would you like to do?
module Todo (Model, init, view) where
import Html exposing (..)
import Html.Attributes exposing (style)
import Html.Events exposing (onClick)
-- model
type alias Model = String
init : String -> Model
init task = task
-- update
-- view
view : Model -> Html
view model =
div [ taskStyle ] [ text model ]
taskStyle : Attribute
taskStyle =
style
[ ("box-sizing", "border-box")
, ("margin", "5px")
, ("padding", "5px")
, ("width", "200px")
, ("height", "50px")
, ("border-radius", "5px")
, ("background-color", "#559")
, ("color", "#fff")
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment