Created
November 7, 2019 15:36
-
-
Save jouderianjr/56cda2079b045917043191774f5d4013 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 Explorer.Utils exposing (story, storyList, storyWithModel) | |
import Element exposing (layout, spacing, wrappedRow) | |
story ( title, content, note ) = | |
( title | |
, \_ -> layout [] content | |
, note | |
) | |
storyList ( title, content, note ) = | |
( title | |
, \_ -> | |
layout [] <| | |
wrappedRow [ spacing 15 ] content | |
, note | |
) | |
storyWithModel ( title, content, note ) = | |
( title | |
, \m -> layout [] <| content m | |
, note | |
) | |
-- Example | |
defaultButtonStory = | |
story | |
( "Default" | |
, yourElementView | |
, { note = "My note" } | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment