mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-09-21 12:19:03 +03:00
🎨 don't use extensible record for viewWithTabControls
mostly for consistency with the other use cases. changing it helped me realize we were passing an extra attribute in a test so that's a good sign I guess!
This commit is contained in:
parent
76edaed8b8
commit
d039512615
@ -137,23 +137,22 @@ Returns:
|
||||
|
||||
-}
|
||||
viewWithTabControls :
|
||||
{ cfg
|
||||
| selected : id
|
||||
, slides :
|
||||
List
|
||||
{ id : id
|
||||
, idString : String
|
||||
, name : String
|
||||
, visibleLabelId : Maybe String
|
||||
, slideHtml : Html msg
|
||||
, tabControlHtml : Html Never
|
||||
}
|
||||
, tabControlStyles : Bool -> List Style
|
||||
, tabControlListStyles : List Style
|
||||
, role : Role
|
||||
, name : String
|
||||
, visibleLabelId : Maybe String
|
||||
, focusAndSelect : { select : id, focus : Maybe String } -> msg
|
||||
{ selected : id
|
||||
, slides :
|
||||
List
|
||||
{ id : id
|
||||
, idString : String
|
||||
, name : String
|
||||
, visibleLabelId : Maybe String
|
||||
, slideHtml : Html msg
|
||||
, tabControlHtml : Html Never
|
||||
}
|
||||
, tabControlStyles : Bool -> List Style
|
||||
, tabControlListStyles : List Style
|
||||
, role : Role
|
||||
, name : String
|
||||
, visibleLabelId : Maybe String
|
||||
, focusAndSelect : { select : id, focus : Maybe String } -> msg
|
||||
}
|
||||
->
|
||||
{ controls : Html msg
|
||||
@ -227,7 +226,16 @@ viewWithCombinedControls :
|
||||
viewWithCombinedControls config =
|
||||
let
|
||||
{ controls, slides, containerAttributes } =
|
||||
viewWithTabControls config
|
||||
viewWithTabControls
|
||||
{ selected = config.selected
|
||||
, slides = config.slides
|
||||
, tabControlStyles = config.tabControlStyles
|
||||
, tabControlListStyles = config.tabControlListStyles
|
||||
, role = config.role
|
||||
, name = config.name
|
||||
, visibleLabelId = config.visibleLabelId
|
||||
, focusAndSelect = config.focusAndSelect
|
||||
}
|
||||
|
||||
{ viewPreviousButton, viewNextButton } =
|
||||
case findPreviousAndNextSlides .id config of
|
||||
|
@ -278,7 +278,6 @@ viewWithTabControlsSpec =
|
||||
VisibleLabel ->
|
||||
Just "carousel-label"
|
||||
, focusAndSelect = FocusAndSelect
|
||||
, announceAndSelect = AnnounceAndSelect
|
||||
}
|
||||
|> (\{ controls, slides, containerAttributes } ->
|
||||
section containerAttributes [ slides, controls ]
|
||||
|
Loading…
Reference in New Issue
Block a user