mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-19 03:31:32 +03:00
don't case now that we use a single constructor
This commit is contained in:
parent
d4625ae274
commit
365d625cca
@ -32,11 +32,9 @@ type FocusTrap
|
||||
{-| Attach this attribute to add a focus trap to an HTML element.
|
||||
-}
|
||||
toAttribute : (String -> msg) -> FocusTrap -> Html.Attribute msg
|
||||
toAttribute focus trap =
|
||||
toAttribute focus (FocusTrap { firstId, lastId }) =
|
||||
onTab <|
|
||||
\elementId shiftKey ->
|
||||
case trap of
|
||||
FocusTrap { firstId, lastId } ->
|
||||
-- if the user tabs back while on the first id,
|
||||
-- we want to wrap around to the last id.
|
||||
if elementId == firstId && shiftKey then
|
||||
|
Loading…
Reference in New Issue
Block a user