Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Last active April 12, 2016 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/095061eb357a2f874c0f25997586ce6e to your computer and use it in GitHub Desktop.
Save chuck0523/095061eb357a2f874c0f25997586ce6e to your computer and use it in GitHub Desktop.
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