Created
July 20, 2018 17:09
-
-
Save Chadtech/095c5b831d0143cdf54da4d488e24a31 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| module Html.Custom | |
| exposing | |
| ( container | |
| , row | |
| , column | |
| ) | |
| import Html.Grid as Grid | |
| import Html exposing (Html) | |
| container : List (Attributes msg) -> List (Html msg) -> Html msg | |
| container = | |
| grid.container | |
| row : Grid.Position -> List (Attributes msg) -> List (Html msg) -> Html msg | |
| row = | |
| grid.row | |
| column : Grid.Position -> List (Attributes msg) -> List (Html msg) -> Html msg | |
| column = | |
| grid.column | |
| grid : Grid.System | |
| grid = | |
| { columns = | |
| [ (Grid.px 40) | |
| , (Grid.auto) | |
| , (Grid.px 120) | |
| ] | |
| , rows = | |
| [ Grid.px 100 ] | |
| } | |
| |> Grid.init | |
| -- In Html.Grid.elm -- | |
| type alias System = | |
| { row : Position -> List (Attributes msg) -> List (Html msg) -> Html msg | |
| , column : Position -> List (Attributes msg) -> List (Html msg) -> Html msg | |
| , contianer : List (Attributes msg) -> List (Html msg) -> Html msg | |
| } | |
| init : { columns : List Spacing , rows : List Spacing } -> System | |
| type Spacing | |
| = Auto | |
| | Px Float | |
| | Label String --??? | |
| type Position | |
| = Index Int | |
| | Label |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment