module Main exposing (main)
import Html exposing (Html, button, div, text)
import Html.Events exposing (onClick)
main : Program Never Model Msg
main =
Html.beginnerProgram
{ model = 0
, view = view
, update = update
}
type alias Model =
Int
type Msg
= NoMsg
update : Msg -> Model -> Model
update msg model =
case msg of
NoMsg ->
model
view : Model -> Html Msg
view model =
div []
[ div [] [ div [] [ text "0"] ]
, div []
[ button [ onClick NoMsg ] [ text "C" ]
, button [ onClick NoMsg ] [ text "+" ]
, button [ onClick NoMsg ] [ text "-" ]
, button [ onClick NoMsg ] [ text "*" ]
, button [ onClick NoMsg ] [ text "/" ]
, button [ onClick NoMsg ] [ text "=" ]
]
, div []
[ button [ onClick NoMsg ] [ text "1" ]
, button [ onClick NoMsg ] [ text "2" ]
, button [ onClick NoMsg ] [ text "3" ]
, button [ onClick NoMsg ] [ text "4" ]
, button [ onClick NoMsg ] [ text "5" ]
, button [ onClick NoMsg ] [ text "6" ]
, button [ onClick NoMsg ] [ text "7" ]
, button [ onClick NoMsg ] [ text "8" ]
, button [ onClick NoMsg ] [ text "9" ]
, button [ onClick NoMsg ] [ text "0" ]
]
]