UNPKG

ldx-widgets

Version:

widgets

63 lines (47 loc) 1.63 kB
[<< Component Index](../README.md) # [AlertModal](https://github.com/tmfi/ldx-web-utilities/blob/develop/src/components/alert_modal.coffee) ### close **`Function`** _Required_ Function that closes the modal --- ### cancelText **`String`** _Optional_ Default to 'Cancel'. The title of the 'Cancel' or 'Dismiss' button. Note: If the props.cb method is NOT passed this button is not rendered. --- ### okText **`String`** _Optional_ Default to 'OK'. The title of the 'okay' or 'confirm' button. Note: This functions as the cancel or close button if th props.cb method is not passed --- ### okColor **`String`** _Optional_ Default to the primary blue. The color of the 'okay' or 'confirm' button. --- ### cb **`Function`** _Required_ Function that gets called when the 'OK' button is clicked. Presumably this executes some sort of action like navigating the user or deleting an item. --- ### alertTitle **`String`** _Optional_ The main point of the alert modal, eg 'Delete Item' or 'Unsaved Changes' If alertTitle is not provided, only the message will be rendered --- ### alertIcon **`Enum`** _Optional_ Defaults to 'WARNING'. The icon to show next to the alert title. Note: will not show if no alertTitle is passed. --- ### message **`String`** _Optional_ Can be a string that is the detail text of the alert modal, rendering on the the title. Can be a react element that is the entire body of the modal. This will cause the title, icon, and message above to not be rendered. If message is not provied the generic NoAccess widget will be rendered.