Confirm Choice is a modal that is pre-made for you in ember-fw. While the documentation for FwFullscreenModal, suggested that you need to follow the basic instructions in to make your own modal, as detailed in BaseModal, confirm-choice is one that is already made with the design of simply confirming a message. 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-choice' @size='md' @close={{action 'closeMyModal'}} @model={{hash
message="Are you sure you want to do this?"
onConfirm=(action 'confirmMyModal')
confirmButtonText="Yes"
...
}}
/>
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.confirmButtonIcon
StringFont-awesome icon to be displayed on the confirm button. For a full list of fontawesome icons, click here.
Default: 'fa-solid fa-check'
model.confirmButtonStyle
StringThis is the CSS style for the confirm 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: 'primary'
model.confirmButtonText
StringThis is the text which will appear on the confirm button.
Default: 'Confirm'