mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-01 09:12:33 +03:00
Adds initOpen
This commit is contained in:
parent
e3f714d2c3
commit
76310b35ed
@ -1,5 +1,5 @@
|
|||||||
module Nri.Ui.Modal.V9 exposing
|
module Nri.Ui.Modal.V9 exposing
|
||||||
( Model, init
|
( Model, init, initOpen
|
||||||
, Msg, update, subscriptions
|
, Msg, update, subscriptions
|
||||||
, open, close
|
, open, close
|
||||||
, info, warning
|
, info, warning
|
||||||
@ -8,12 +8,13 @@ module Nri.Ui.Modal.V9 exposing
|
|||||||
|
|
||||||
{-| Changes from V8:
|
{-| Changes from V8:
|
||||||
|
|
||||||
|
- adds initOpen
|
||||||
- enable checks against the state (e.g., is the modal open or not?)
|
- enable checks against the state (e.g., is the modal open or not?)
|
||||||
|
|
||||||
|
|
||||||
## State and updates
|
## State and updates
|
||||||
|
|
||||||
@docs Model, init
|
@docs Model, init, initOpen
|
||||||
@docs Msg, update, subscriptions
|
@docs Msg, update, subscriptions
|
||||||
|
|
||||||
@docs open, close
|
@docs open, close
|
||||||
@ -59,6 +60,13 @@ init =
|
|||||||
Closed
|
Closed
|
||||||
|
|
||||||
|
|
||||||
|
{-| Pass the id of the element that should receive focus when the modal is closed.
|
||||||
|
-}
|
||||||
|
initOpen : String -> Model
|
||||||
|
initOpen =
|
||||||
|
Opened
|
||||||
|
|
||||||
|
|
||||||
type By
|
type By
|
||||||
= EscapeKey
|
= EscapeKey
|
||||||
| OverlayClick
|
| OverlayClick
|
||||||
|
Loading…
Reference in New Issue
Block a user