rollback change in the modal dialog

pull/1879/head
yann300 3 years ago
parent 65f4b086ac
commit 8c9c0cbce8
  1. 8
      libs/remix-ui/app/src/lib/remix-app/interface/index.ts
  2. 4
      libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx

@ -6,10 +6,10 @@ export interface AppModal {
title: string title: string
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
message: string | JSX.Element message: string | JSX.Element
okLabel?: string okLabel: string
okFn?: (value?:any) => void okFn: (value?:any) => void
cancelLabel?: string cancelLabel: string
cancelFn?: () => void, cancelFn: () => void,
modalType?: ModalTypes, modalType?: ModalTypes,
defaultValue?: string defaultValue?: string
hideFn?: () => void hideFn?: () => void

@ -96,7 +96,7 @@ export const ModalDialog = (props: ModalDialogProps) => {
</div> </div>
<div className="modal-footer" data-id={`${props.id}ModalDialogModalFooter-react`}> <div className="modal-footer" data-id={`${props.id}ModalDialogModalFooter-react`}>
{/* todo add autofocus ^^ */} {/* todo add autofocus ^^ */}
{<span { props.okLabel && <span
data-id={`${props.id}-modal-footer-ok-react`} 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={() => {
@ -107,7 +107,7 @@ export const ModalDialog = (props: ModalDialogProps) => {
{props.okLabel ? props.okLabel : 'OK'} {props.okLabel ? props.okLabel : 'OK'}
</span> </span>
} }
{<span { props.cancelLabel && <span
data-id={`${props.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"

Loading…
Cancel
Save