|
|
@ -42,7 +42,7 @@ export const ModalDialog = (props: ModalDialogProps) => { |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
data-id="modalDialogContainer-react" |
|
|
|
data-id={`${props.id}ModalDialogContainer-react`} |
|
|
|
data-backdrop="static" |
|
|
|
data-backdrop="static" |
|
|
|
data-keyboard="false" |
|
|
|
data-keyboard="false" |
|
|
|
className='modal' |
|
|
|
className='modal' |
|
|
@ -61,7 +61,7 @@ export const ModalDialog = (props: ModalDialogProps) => { |
|
|
|
onKeyDown={({ keyCode }) => { modalKeyEvent(keyCode) }} |
|
|
|
onKeyDown={({ keyCode }) => { modalKeyEvent(keyCode) }} |
|
|
|
> |
|
|
|
> |
|
|
|
<div className="modal-header"> |
|
|
|
<div className="modal-header"> |
|
|
|
<h6 className="modal-title" data-id="modalDialogModalTitle-react"> |
|
|
|
<h6 className="modal-title" data-id={`${props.id}ModalDialogModalTitle-react`}> |
|
|
|
{props.title && props.title} |
|
|
|
{props.title && props.title} |
|
|
|
</h6> |
|
|
|
</h6> |
|
|
|
{!props.showCancelIcon && |
|
|
|
{!props.showCancelIcon && |
|
|
@ -70,13 +70,14 @@ export const ModalDialog = (props: ModalDialogProps) => { |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
} |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="modal-body text-break remixModalBody" data-id="modalDialogModalBody-react"> |
|
|
|
<div className="modal-body text-break remixModalBody" data-id={`${props.id}ModalDialogModalBody-react`}> |
|
|
|
{ props.children ? props.children : props.message } |
|
|
|
{ props.children ? props.children : props.message } |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="modal-footer" data-id="modalDialogModalFooter-react"> |
|
|
|
<div className="modal-footer" data-id={`${props.id}ModalDialogModalFooter-react`}> |
|
|
|
{/* todo add autofocus ^^ */} |
|
|
|
{/* todo add autofocus ^^ */} |
|
|
|
{ props.ok && |
|
|
|
{ props.ok && |
|
|
|
<span |
|
|
|
<span |
|
|
|
|
|
|
|
data-id={`${props.id}-modal-footer-ok-react`} |
|
|
|
className={'modal-ok btn btn-sm ' + (state.toggleBtn ? 'btn-dark' : 'btn-light')} |
|
|
|
className={'modal-ok btn btn-sm ' + (state.toggleBtn ? 'btn-dark' : 'btn-light')} |
|
|
|
onClick={() => { |
|
|
|
onClick={() => { |
|
|
|
if (props.ok.fn) props.ok.fn() |
|
|
|
if (props.ok.fn) props.ok.fn() |
|
|
@ -88,7 +89,7 @@ export const ModalDialog = (props: ModalDialogProps) => { |
|
|
|
} |
|
|
|
} |
|
|
|
{ props.cancel && |
|
|
|
{ props.cancel && |
|
|
|
<span |
|
|
|
<span |
|
|
|
data-id='modal-footer-cancel-react' |
|
|
|
data-id={`${props.id}-modal-footer-cancel-react`} |
|
|
|
className={'modal-cancel btn btn-sm ' + (state.toggleBtn ? 'btn-light' : 'btn-dark')} |
|
|
|
className={'modal-cancel btn btn-sm ' + (state.toggleBtn ? 'btn-light' : 'btn-dark')} |
|
|
|
data-dismiss="modal" |
|
|
|
data-dismiss="modal" |
|
|
|
onClick={() => { |
|
|
|
onClick={() => { |
|
|
|