-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add initial elm-ui example code for #145
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!") |