-
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.
suggest an alternative scoped import to reduce line length for elm-ui #…
- Loading branch information
Showing
2 changed files
with
116 additions
and
11 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
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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
module Main exposing (main) | ||
|
||
import Element exposing (Element, alignRight, centerX, centerY, el, fill, padding, rgb255, row, spacing, text, width) | ||
import Element as E exposing (Element, el, row) | ||
import Element.Background as Background | ||
import Element.Border as Border | ||
import Element.Font as Font | ||
|
||
|
||
main = | ||
Element.layout [] | ||
E.layout [] | ||
rowOfStuff | ||
|
||
|
||
rowOfStuff : Element msg | ||
rowOfStuff = | ||
row [ width fill, centerY, spacing 30 ] | ||
row [ E.width E.fill, E.centerY, E.spacing 30 ] | ||
[ myElement | ||
, el [ centerX ] myElement | ||
, el [ alignRight ] myElement -- align the element to the right | ||
, el [ E.centerX ] myElement | ||
, el [ E.alignRight ] myElement | ||
] | ||
|
||
|
||
myElement : Element msg | ||
myElement = | ||
el | ||
[ Background.color (rgb255 75 192 169) | ||
, Font.color (rgb255 255 255 255) | ||
[ Background.color (E.rgb255 75 192 169) | ||
, Font.color (E.rgb255 255 255 255) | ||
, Border.rounded 10 | ||
, paddign 30 | ||
, E.padding 30 | ||
] | ||
(text "stylish!") | ||
(E.text "stylish!") |