mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-24 00:42:29 +03:00
Adds Button examples
This commit is contained in:
parent
cf319c6423
commit
db95e2c3b9
@ -114,7 +114,14 @@ preview_ navigate example =
|
||||
[ ClickableText.href (exampleHref example)
|
||||
, ClickableText.css [ Css.marginBottom (Css.px 10) ]
|
||||
]
|
||||
:: List.map (Html.map never) example.preview
|
||||
:: [ Html.div
|
||||
[ Attributes.css
|
||||
[ Css.displayFlex
|
||||
, Css.flexDirection Css.column
|
||||
]
|
||||
]
|
||||
(List.map (Html.map never) example.preview)
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
|
@ -33,7 +33,7 @@ example =
|
||||
[ Balloon.balloon
|
||||
[ Balloon.onTop
|
||||
, Balloon.navy
|
||||
, Balloon.paddingPx 4
|
||||
, Balloon.paddingPx 15
|
||||
]
|
||||
(text "This is a balloon.")
|
||||
]
|
||||
|
@ -28,7 +28,21 @@ example =
|
||||
, state = init
|
||||
, update = update
|
||||
, subscriptions = \_ -> Sub.none
|
||||
, preview = []
|
||||
, preview =
|
||||
[ Button.link "Primary" [ Button.small, Button.fillContainerWidth ]
|
||||
, Button.link "Secondary"
|
||||
[ Button.small
|
||||
, Button.fillContainerWidth
|
||||
, Button.secondary
|
||||
, Button.css [ Css.marginTop (Css.px 8) ]
|
||||
]
|
||||
, Button.link "Premium"
|
||||
[ Button.small
|
||||
, Button.fillContainerWidth
|
||||
, Button.premium
|
||||
, Button.css [ Css.marginTop (Css.px 8) ]
|
||||
]
|
||||
]
|
||||
, view = \state -> [ viewButtonExamples state ]
|
||||
, categories = [ Buttons ]
|
||||
, keyboardSupport = []
|
||||
|
@ -14,12 +14,13 @@ preview icons =
|
||||
[ Html.div
|
||||
[ css
|
||||
[ Css.displayFlex
|
||||
, Css.justifyContent Css.spaceBetween
|
||||
, Css.flexWrap Css.wrap
|
||||
, Css.property "gap" "10px"
|
||||
, Css.color Colors.gray45
|
||||
]
|
||||
]
|
||||
(List.map
|
||||
(Svg.withWidth (Css.px 18) >> Svg.withHeight (Css.px 18) >> Svg.toHtml)
|
||||
(Svg.withWidth (Css.px 30) >> Svg.withHeight (Css.px 30) >> Svg.toHtml)
|
||||
icons
|
||||
)
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user