Description

Allows an easy way to create and show modals.

Details

Members


<static> ModalSizes

Description

Sizes of modals.

Details

Methods


<static> showUserProfile( userId )

Description

Shows the user profile modal for a given user.

Parameters
Name Type Description
userId string

id of the user to show profile for

Details

<static> showConfirmationModal( title, content [, options ] )

Description

Acts as a wrapper for module:Modals.showModal where the children is a text element.

Parameters
Name Type Attributes Description
title string

title of the modal

content string

text to show inside the modal. Can be markdown.

options object <optional>

see module:Modals.showModal


<static> showAlertModal( title, body )

Description

Shows a very simple alert modal that has title, content and an okay button.

Parameters
Name Type Description
title string

title of the modal

body string

text to show inside the modal

Details

<static> showModal( title, children [, options ] )

Description

Shows a generic but very customizable modal.

Parameters
Name Type Attributes Description
title string

title of the modal

children ReactElement | Array.<ReactElement>

a single or array of rendered react elements to act as children

options object <optional>

options to modify the modal

Name Type Attributes Default Description
danger boolean <optional>
false

whether the main button should be red or not

confirmText string <optional>
Okay

text for the confirmation/submit button

cancelText string <optional>
Cancel

text for the cancel button

onConfirm callable <optional>
NOOP

callback to occur when clicking the submit button

onCancel callable <optional>
NOOP

callback to occur when clicking the cancel button

Details

<static> showChangelogModal( title, version, changelog, footer )

Description

Shows a changelog modal based on changelog data.

Parameters
Name Type Description
title string

title of the modal

version string

subtitle (usually version or date) of the modal

changelog module:Modals~Changelog

changelog to show inside the modal

footer string

either an html element or text to show in the footer of the modal. Can use markdown.

Details