Closed sudeeptarlekar closed 4 years ago
I want to render Sweetalert with text having HTML elements, How can I fo that? Right now I am rendering the Sweetalert like this
<SweetAlert show={showConfirm} title={title} text="Are you sure you want to remove task <b>Rolling</b>?" showCancelButton confirmButtonText="Confirm" customClass="confirm-modal confirm-delete-modal" onConfirm={this.handleConfirmClick} onCancel={this.hideConfirm} />
So here, instead of showing Rolling in bold letters it is rendering text as Are you sure you want to remove task <b>Rolling</b>?
Rolling
Are you sure you want to remove task <b>Rolling</b>?
use html={'...'} instead of text={'...'}
html={'...'}
text={'...'}
I want to render Sweetalert with text having HTML elements, How can I fo that? Right now I am rendering the Sweetalert like this
So here, instead of showing
Rolling
in bold letters it is rendering text asAre you sure you want to remove task <b>Rolling</b>?