mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-23 16:32:11 +03:00
Make lastId required for disclosure
This commit is contained in:
parent
97ead64d23
commit
8ceb7b8e1a
@ -120,7 +120,7 @@ type alias ButtonConfig =
|
||||
|
||||
type Purpose
|
||||
= NavMenu
|
||||
| Disclosure { lastId : Maybe String }
|
||||
| Disclosure { lastId : String }
|
||||
|
||||
|
||||
|
||||
@ -220,7 +220,7 @@ You will need to pass in the last focusable element in the disclosed content in
|
||||
You may pass a lastId of Nothing if there is NO focusable content within the disclosure.
|
||||
|
||||
-}
|
||||
disclosure : { lastId : Maybe String } -> Attribute msg
|
||||
disclosure : { lastId : String } -> Attribute msg
|
||||
disclosure exitFocusManager =
|
||||
Attribute (\config -> { config | purpose = Disclosure exitFocusManager })
|
||||
|
||||
@ -473,7 +473,7 @@ viewCustom config =
|
||||
Disclosure { lastId } ->
|
||||
WhenFocusLeaves.toAttribute
|
||||
{ firstId = config.buttonId
|
||||
, lastId = Maybe.withDefault config.buttonId lastId
|
||||
, lastId = lastId
|
||||
, tabBackAction =
|
||||
config.focusAndToggle
|
||||
{ isOpen = False
|
||||
|
@ -255,7 +255,7 @@ view ellieLinkConfig state =
|
||||
(menuAttributes
|
||||
++ [ Menu.buttonId "with_controls__button"
|
||||
, Menu.menuId "with_controls__menu"
|
||||
, Menu.disclosure { lastId = Just "login__button" }
|
||||
, Menu.disclosure { lastId = "login__button" }
|
||||
]
|
||||
)
|
||||
{ isOpen = isOpen "with_controls"
|
||||
|
Loading…
Reference in New Issue
Block a user