Adds initOpen

This commit is contained in:
Tessa Kelly 2020-07-02 16:29:36 -07:00
parent e3f714d2c3
commit 76310b35ed

View File

@ -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