Improve modal popup CSS
This commit is contained in:
parent
4ad62eb196
commit
28ffdcf19e
@ -1,7 +1,7 @@
|
||||
.show-modal {
|
||||
.modal.modal-show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.modal-hide {
|
||||
.modal.modal-hide {
|
||||
display: none;
|
||||
}
|
@ -21,34 +21,36 @@ const ConfirmationModal: React.FunctionComponent<ConfirmationModalProps> = ({
|
||||
}) => {
|
||||
const modalShowClass = props.show ? 'modal-show': 'modal-hide';
|
||||
return (
|
||||
<div className={modalShowClass} tabIndex={-1} role="dialog">
|
||||
<div className="modal-dialog" role="document">
|
||||
<div className="modal-content">
|
||||
<div className="modal-header">
|
||||
<h5 className="modal-title">{props.title}</h5>
|
||||
<button
|
||||
type="button"
|
||||
className="close"
|
||||
aria-label="Close"
|
||||
onClick={() => props.onCancel()}
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div className="modal-body">
|
||||
<p>{props.description}</p>
|
||||
</div>
|
||||
<div className="modal-footer">
|
||||
<button
|
||||
type="button"
|
||||
className={`btn btn-block ${confirmButtonClass}`}
|
||||
onClick={() => props.onConfirm()}
|
||||
>{confirmButtonText}</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`btn btn-block ${cancelButtonClass}`}
|
||||
onClick={() => props.onCancel()}
|
||||
>Cancel</button>
|
||||
<div className={`modal ${modalShowClass}`} tabIndex={-1} role="dialog">
|
||||
<div className="modal-backdrop">
|
||||
<div className="modal-dialog" role="document">
|
||||
<div className="modal-content">
|
||||
<div className="modal-header">
|
||||
<h5 className="modal-title">{props.title}</h5>
|
||||
<button
|
||||
type="button"
|
||||
className="close"
|
||||
aria-label="Close"
|
||||
onClick={() => props.onCancel()}
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div className="modal-body">
|
||||
<p>{props.description}</p>
|
||||
</div>
|
||||
<div className="modal-footer">
|
||||
<button
|
||||
type="button"
|
||||
className={`btn btn-block ${confirmButtonClass}`}
|
||||
onClick={() => props.onConfirm()}
|
||||
>{confirmButtonText}</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`btn btn-block ${cancelButtonClass}`}
|
||||
onClick={() => props.onCancel()}
|
||||
>Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user