NoRedInk/noredink-ui/6.22.0

NOTE: the latest version is 35.9.3

Nri.Ui.Modal.V4

Changes from V3:

  • changed onDismiss from Maybe msg to Dismissibility msg

Changes from V2:

  • Add assets for close button
type alias Model msg =
{ title : String
, visibleTitle : Bool
, content : Html msg
, footerContent : List (Html msg)
, onDismiss : Dismissibility msg
, width : Maybe Int
}
  • onDismiss: If Nothing, the modal will not be dismissable
  • visibleTitle: If False, the title will still be used for screen readers
  • content: This will be placed in a width:100% div in the main area of the modal
  • footerContent: The optional items here will be stacked below the main content area and center-aligned. Commonly you will either give a list of Nri.Ui.Buttons, or an empty list.
= NotDismissible
| WithBackgroundOrX msg
| WithOnlyX msg
  • NotDismissible
  • WithBackgroundOrX: user can dismiss by clicking "X" (top right) or modal backdrop
  • WithOnlyX: user can dismiss by clicking "X" (top right)
info : Assets r -> Model msg -> Html msg
warning : Assets r -> Model msg -> Html msg