UNPKG

nowrapper

Version:

nowrapper

31 lines (25 loc) 770 B
import DialogFormFactory from '../common/dialog/DialogFormFactory'; const DialogFormWrapper = (NextSource) => { const { Dialog, Button } = NextSource; Dialog.show = Dialog.confirm; const compatiMap = { show: (options) => { const { width, className } = options; return { ...options, width, className: `${className || ''} dialog-form-wrapper`, needWrapper: false, footer: () => null, }; }, dialogInstance: dialogInstance => dialogInstance, btnLoadingProps: 'loading', }; return new DialogFormFactory({ Dialog, Button, compatiMap, }); }; export default DialogFormWrapper;