mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-19 11:41:32 +03:00
Simplify preview setup
This commit is contained in:
parent
4b6ac208ee
commit
eaacc02e73
@ -31,12 +31,11 @@ example =
|
||||
, update = update
|
||||
, subscriptions = \_ -> Sub.none
|
||||
, preview =
|
||||
[ ( "caption", Text.caption )
|
||||
, ( "smallBody", Text.smallBody )
|
||||
, ( "mediumBody", Text.mediumBody )
|
||||
, ( "ugMediumBody", Text.ugMediumBody )
|
||||
[ Text.caption [ Text.plaintext "caption" ]
|
||||
, Text.smallBody [ Text.plaintext "smallBody" ]
|
||||
, Text.mediumBody [ Text.plaintext "mediumBody" ]
|
||||
, Text.ugMediumBody [ Text.plaintext "ugMediumBody" ]
|
||||
]
|
||||
|> List.map viewPreview
|
||||
, view =
|
||||
\state ->
|
||||
let
|
||||
@ -86,11 +85,6 @@ example =
|
||||
}
|
||||
|
||||
|
||||
viewPreview : ( String, List (Text.Attribute msg) -> Html msg ) -> Html msg
|
||||
viewPreview ( name, view ) =
|
||||
view [ Text.plaintext name ]
|
||||
|
||||
|
||||
viewExamples : List ( String, List (Text.Attribute msg) -> Html msg ) -> List (Text.Attribute msg) -> Html msg
|
||||
viewExamples examples attributes =
|
||||
let
|
||||
|
Loading…
Reference in New Issue
Block a user