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
// eslint-disable-next-line no-undef
message: string | JSX.Element
okLabel?: string
okFn?: (value?:any) => void
cancelLabel?: string
cancelFn?: () => void,
okLabel: string
okFn: (value?:any) => void
cancelLabel: string
cancelFn: () => void,
modalType?: ModalTypes,
defaultValue?: string
hideFn?: () => void

@ -96,7 +96,7 @@ export const ModalDialog = (props: ModalDialogProps) => {
</div>
<div className="modal-footer" data-id={`${props.id}ModalDialogModalFooter-react`}>
{/* todo add autofocus ^^ */}
{<span
{ props.okLabel && <span
data-id={`${props.id}-modal-footer-ok-react`}
className={'modal-ok btn btn-sm ' + (state.toggleBtn ? 'btn-dark' : 'btn-light')}
onClick={() => {
@ -107,7 +107,7 @@ export const ModalDialog = (props: ModalDialogProps) => {
{props.okLabel ? props.okLabel : 'OK'}
</span>
}
{<span
{ props.cancelLabel && <span
data-id={`${props.id}-modal-footer-cancel-react`}
className={'modal-cancel btn btn-sm ' + (state.toggleBtn ? 'btn-light' : 'btn-dark')}
data-dismiss="modal"

Loading…
Cancel
Save