Confirm Dialog is a modal very similar to confirm-choice modal that is pre-made for you in ember-fw. The only difference really is that the confirm-dialog modal is for an alert with only a close button, while the confirm-choice has a confirm button. As with the confirm-choice as well, confirm-dialog is made in such a way that you only need to call it using FwFullscreenModal, rather than making your own modal following the instructions detailed in BaseModal. Because this is a regular modal, it will be called as a modal that you had created, and everything will be passed through the model property as usual. For more information on how to use the FwFullscreenModal component, see its documentation.
Basic Usage Example:
<FwFullscreenModal @modal='confirm-dialog' @size='md' @close={{action 'closeMyModal'}} @model={{hash
message="Your Data may be out of sync. Look into it"
...
}}
/>
In order to pass in any data, you must pass in the data to the model
attribute with the hash helper. Listed below in the different "properties" are actually not technically properties, but all sub-properties
of the model parameter in order to properly customize the confirm-choice modal.
_model
Computed privateThis is the internal computed property for model that sets defaults for model if they remain unset by the end user.
model
Unknown protectedThis is the only property passed into the FwFullscreenModal component that actually transfers to this component, and it should be a hash of any of the other properties you wish to set.
model.closeButtonIcon
StringFont-awesome icon to be displayed on the close button. For a full list of fontawesome icons, click here.
Default: 'fa-solid fa-xmark'
model.closeButtonStyle
StringThis is the CSS style for the close button (follows bootstrap btn classes). Most common options are: danger, primary, and default, but for the full list of options, see Bootstrap's documentation. (Note: btn- is added to this button style to make the full button class)
Default: 'danger'