Skip to content

Commit

Permalink
add initial elm-ui example code for #145
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Dec 10, 2019
1 parent 2d1cb7b commit 9be5d14
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tutorials/elm-ui/src/Main.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module Main exposing (main)

import Element exposing (Element, alignRight, centerX, centerY, el, fill, padding, rgb255, row, spacing, text, width)
import Element.Background as Background
import Element.Border as Border
import Element.Font as Font


main =
Element.layout []
myRowOfStuff


myRowOfStuff : Element msg
myRowOfStuff =
row [ width fill, centerY, spacing 30 ]
[ myElement
, el [ centerX ] myElement
, el [ alignRight, padding ] myElement -- align the element to the right
]


myElement : Element msg
myElement =
el
[ Background.color (rgb255 240 0 245)
, Font.color (rgb255 255 255 255)
, Border.rounded 3
, padding 30
]
(text "stylish!")

0 comments on commit 9be5d14

Please sign in to comment.