dashboard/src_storybook/Explorer.elm

63 lines
1.5 KiB
Elm
Raw Normal View History

2021-06-28 16:22:12 +03:00
module Explorer exposing (main)
2021-06-29 17:23:58 +03:00
import Blueprints.BlueprintTile
import Html exposing (div)
import Html.Attributes exposing (attribute, style)
2021-06-30 11:36:26 +03:00
import Pages.Hub exposing (welcomeText)
2021-06-28 16:22:12 +03:00
import UIExplorer
exposing
( UIExplorerProgram
2021-06-29 17:23:58 +03:00
, category
, createCategories
2021-06-28 16:22:12 +03:00
, defaultConfig
, explore
2021-06-29 17:23:58 +03:00
, exploreWithCategories
2021-06-28 16:22:12 +03:00
, storiesOf
)
2021-06-29 17:23:58 +03:00
config =
defaultConfig
2021-06-28 16:22:12 +03:00
main : UIExplorerProgram {} () {} {}
main =
2021-06-29 17:23:58 +03:00
exploreWithCategories
config
(createCategories
|> category
"Hub"
[ storiesOf
"Welcome"
[ ( "default", \_ -> welcomeText, {} ) ]
, storiesOf
"Modules"
[ ( "1", \_ -> welcomeText, {} ) ]
]
|> category
"Blueprints"
[ storiesOf
"Tile"
[ let
model =
{ name = "String"
, author = "String"
, numberOfInstances = 10
, id = "String"
}
in
( "Blueprint tile", \_ -> wrapper {} (Blueprints.BlueprintTile.view model), {} )
]
]
)
wrapper opts x =
div
[ style "height" "500px"
, style "width" "500px"
, style "background" "#F4F4F4"
, style "padding" "50px"
2021-06-28 16:22:12 +03:00
]
2021-06-29 17:23:58 +03:00
[ x ]