mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-19 19:51:37 +03:00
Add icons to default examples, so percy can catch icon regressions
This commit is contained in:
parent
94a0123878
commit
99ee395e10
@ -34,6 +34,7 @@ example =
|
|||||||
[ Button.small
|
[ Button.small
|
||||||
, Button.fillContainerWidth
|
, Button.fillContainerWidth
|
||||||
, Button.custom [ Key.tabbable False ]
|
, Button.custom [ Key.tabbable False ]
|
||||||
|
, Button.icon UiIcon.link
|
||||||
]
|
]
|
||||||
, Button.link "Secondary"
|
, Button.link "Secondary"
|
||||||
[ Button.small
|
[ Button.small
|
||||||
@ -41,6 +42,7 @@ example =
|
|||||||
, Button.secondary
|
, Button.secondary
|
||||||
, Button.css [ Css.marginTop (Css.px 8) ]
|
, Button.css [ Css.marginTop (Css.px 8) ]
|
||||||
, Button.custom [ Key.tabbable False ]
|
, Button.custom [ Key.tabbable False ]
|
||||||
|
, Button.icon UiIcon.link
|
||||||
]
|
]
|
||||||
, Button.link "Premium"
|
, Button.link "Premium"
|
||||||
[ Button.small
|
[ Button.small
|
||||||
@ -48,6 +50,7 @@ example =
|
|||||||
, Button.premium
|
, Button.premium
|
||||||
, Button.css [ Css.marginTop (Css.px 8) ]
|
, Button.css [ Css.marginTop (Css.px 8) ]
|
||||||
, Button.custom [ Key.tabbable False ]
|
, Button.custom [ Key.tabbable False ]
|
||||||
|
, Button.icon UiIcon.link
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, view = \state -> [ viewButtonExamples state ]
|
, view = \state -> [ viewButtonExamples state ]
|
||||||
@ -135,7 +138,7 @@ initDebugControls : Control Model
|
|||||||
initDebugControls =
|
initDebugControls =
|
||||||
Control.record Model
|
Control.record Model
|
||||||
|> Control.field "label" (Control.string "Label")
|
|> Control.field "label" (Control.string "Label")
|
||||||
|> Control.field "icon" iconChoice
|
|> Control.field "icon" (Control.maybe True iconChoice)
|
||||||
|> Control.field "button type"
|
|> Control.field "button type"
|
||||||
(Control.choice
|
(Control.choice
|
||||||
[ ( "button", Control.value Button )
|
[ ( "button", Control.value Button )
|
||||||
@ -163,15 +166,14 @@ initDebugControls =
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
iconChoice : Control.Control (Maybe Svg)
|
iconChoice : Control.Control Svg
|
||||||
iconChoice =
|
iconChoice =
|
||||||
Control.choice
|
Control.choice
|
||||||
[ ( "none", Control.value Nothing )
|
[ ( "preview", Control.value UiIcon.preview )
|
||||||
, ( "preview", Control.value (Just UiIcon.preview) )
|
, ( "arrowLeft", Control.value UiIcon.arrowLeft )
|
||||||
, ( "arrowLeft", Control.value (Just UiIcon.arrowLeft) )
|
, ( "performance", Control.value UiIcon.performance )
|
||||||
, ( "performance", Control.value (Just UiIcon.performance) )
|
, ( "share", Control.value UiIcon.share )
|
||||||
, ( "share", Control.value (Just UiIcon.share) )
|
, ( "download", Control.value UiIcon.download )
|
||||||
, ( "download", Control.value (Just UiIcon.download) )
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user