Skip to content

Instantly share code, notes, and snippets.

@jouderianjr
Created November 7, 2019 15:36
Show Gist options
  • Save jouderianjr/56cda2079b045917043191774f5d4013 to your computer and use it in GitHub Desktop.
Save jouderianjr/56cda2079b045917043191774f5d4013 to your computer and use it in GitHub Desktop.
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