mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-09-21 12:19:03 +03:00
remove duplicate IDs/active selectors in segmented control
This commit is contained in:
parent
946525243e
commit
45574578ca
@ -12,7 +12,7 @@ jq -r -f script/axe-report.jq "$JSON_FILE"
|
||||
# Hey there! Did this script tell you to check out this file because the
|
||||
# expected error count went down? Well done! Just change this number to the new
|
||||
# value.
|
||||
TARGET_ERRORS=59
|
||||
TARGET_ERRORS=56
|
||||
|
||||
# ideally we'd fail on any failures, but we have had a bunch build up over time!
|
||||
# So right now, we need to fail if the error count is not exactly what we
|
||||
|
@ -50,7 +50,7 @@ example parentMessage state =
|
||||
in
|
||||
viewFn
|
||||
{ onClick = Select
|
||||
, options = buildOptions options [ UiIcon.flag, UiIcon.star, Svg.withColor Colors.greenDark UiIcon.attention ]
|
||||
, options = buildOptions "" options [ UiIcon.flag, UiIcon.star, Svg.withColor Colors.greenDark UiIcon.attention ]
|
||||
, selected = state.selected
|
||||
, width = options.width
|
||||
, content = Html.text ("[Content for " ++ Debug.toString state.selected ++ "]")
|
||||
@ -59,7 +59,7 @@ example parentMessage state =
|
||||
, Html.p [] [ Html.text "Used when you only need the ui element and not a page control." ]
|
||||
, SegmentedControl.viewToggle
|
||||
{ onClick = Select
|
||||
, options = buildOptions options [ UiIcon.leaderboard, UiIcon.person, UiIcon.performance ]
|
||||
, options = buildOptions "Toggle-Only " options [ UiIcon.leaderboard, UiIcon.person, UiIcon.performance ]
|
||||
, selected = state.selected
|
||||
, width = options.width
|
||||
}
|
||||
@ -68,8 +68,8 @@ example parentMessage state =
|
||||
}
|
||||
|
||||
|
||||
buildOptions : Options -> List Svg -> List (SegmentedControl.Option ExampleOption)
|
||||
buildOptions options =
|
||||
buildOptions : String -> Options -> List Svg -> List (SegmentedControl.Option ExampleOption)
|
||||
buildOptions prefix options =
|
||||
let
|
||||
buildOption option icon =
|
||||
{ icon =
|
||||
@ -78,7 +78,7 @@ buildOptions options =
|
||||
|
||||
else
|
||||
Nothing
|
||||
, label = "Choice " ++ Debug.toString option
|
||||
, label = prefix ++ "Choice " ++ Debug.toString option
|
||||
, value = option
|
||||
}
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user