mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-24 08:53:33 +03:00
Clean up the examples a bit
This commit is contained in:
parent
9349da5029
commit
4a40c8f430
@ -39,13 +39,6 @@ example =
|
||||
|> Html.Styled.fromUnstyled
|
||||
, Select.view "Tortilla Selector" attributes
|
||||
|> Html.Styled.map ConsoleLog
|
||||
, Html.Styled.div
|
||||
[ Html.Styled.Attributes.css [ Css.maxWidth (Css.px 400) ] ]
|
||||
[ Select.view "Selector with Overflowed Text"
|
||||
[ Select.defaultDisplayText "Look at me, I design coastlines, I got an award for Norway. Where's the sense in that?"
|
||||
]
|
||||
|> Html.Styled.map ConsoleLog
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
@ -86,19 +79,20 @@ initControls =
|
||||
|
||||
initChoices : Control (List (Choice String))
|
||||
initChoices =
|
||||
ControlExtra.list
|
||||
|> initChoice "value-1" "Tacos"
|
||||
|> initChoice "value-2" "Burritos"
|
||||
|> initChoice "value-3" "Enchiladas"
|
||||
|
||||
|
||||
initChoice : String -> String -> Control (List (Choice String)) -> Control (List (Choice String))
|
||||
initChoice value default =
|
||||
let
|
||||
toChoice label =
|
||||
{ label = label, value = value }
|
||||
in
|
||||
ControlExtra.listItem value (Control.map toChoice (Control.string default))
|
||||
Control.choice
|
||||
[ ( "Short choices"
|
||||
, [ { label = "Tacos", value = "tacos" }
|
||||
, { label = "Burritos", value = "burritos" }
|
||||
, { label = "Enchiladas", value = "enchiladas" }
|
||||
]
|
||||
|> Control.value
|
||||
)
|
||||
, ( "Overflowing text choices"
|
||||
, [ { label = "Look at me, I design coastlines, I got an award for Norway. Where's the sense in that? My mistress' eyes are nothing like the sun. Coral be far more red than her lips red.", value = "design-coastlines" }
|
||||
]
|
||||
|> Control.value
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
{-| -}
|
||||
|
Loading…
Reference in New Issue
Block a user