git.iko.soy/typeable/elm-ui
on master help sign in
Three fixes to the documentation of Element.Input. 1) Stating that rendering a track is requiredfor sliders, 2) Fixing the call to Input.labelAbove in the code snippet for Input.radio, and 3) simplifying the example for Input.radio
bd35c8fSalomon Turgman
src/Element/Input.elm+3−14
@@ -352,7 +352,7 @@ defaultThumb =
352 Input.defaultThumb
352 Input.defaultThumb
353 }
353 }
354
354
355−The `thumb` is the icon that you can move around.
355+`Element.behindContent` is used to render the track of the slider. Without it, no track would be rendered. The `thumb` is the icon that you can move around.
356
356
357The slider can be vertical or horizontal depending on the width/height of the slider.
357The slider can be vertical or horizontal depending on the width/height of the slider.
358
358
@@ -1297,20 +1297,9 @@ optionWith val view =
1297 ]
1297 ]
1298 { onChange = ChooseLunch
1298 { onChange = ChooseLunch
1299 , selected = Just model.lunch
1299 , selected = Just model.lunch
1300− , label = Input.labelAbove (text "Lunch")
1300+ , label = Input.labelAbove [] (text "Lunch")
1301 , options =
1301 , options =
1302− [ Input.styledChoice Burrito <|
1302+ [ Input.option Burrito (text "Burrito")
1303− \selected ->
1304− Element.row
1305− [ spacing 5 ]
1306− [ el None [] <|
1307− if selected then
1308− text ":D"
1309−
1310− else
1311− text ":("
1312− , text "burrito"
1313− ]
1314 , Input.option Taco (text "Taco!")
1303 , Input.option Taco (text "Taco!")
1315 , Input.option Gyro (text "Gyro")
1304 , Input.option Gyro (text "Gyro")
1316 ]
1305 ]