File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,12 @@ export default {
6666
6767 render ( ) {
6868 const { type, loading, buttonProps } = this ;
69- return (
70- < Button type = { type } onClick = { this . onClick } loading = { loading } { ...buttonProps } >
71- { getSlot ( this ) }
72- </ Button >
73- ) ;
69+ const props = {
70+ type,
71+ onClick : this . onClick ,
72+ loading,
73+ ...buttonProps ,
74+ } ;
75+ return < Button { ...props } > { getSlot ( this ) } </ Button > ;
7476 } ,
7577} ;
Original file line number Diff line number Diff line change @@ -82,13 +82,13 @@ export interface ModalOptions {
8282 * The ok button props
8383 * @type object
8484 */
85- okButtonProps ?: Button ;
85+ okButtonProps ?: Button . $props ;
8686
8787 /**
8888 * The cancel button props
8989 * @type object
9090 */
91- cancelButtonProps ?: Button ;
91+ cancelButtonProps ?: Button . $props ;
9292
9393 /**
9494 * Title
@@ -259,13 +259,13 @@ export declare class Modal extends AntdComponent {
259259 * The ok button props, follow jsx rules
260260 * @type object
261261 */
262- okButtonProps ?: { props : Button ; on : { } } ;
262+ okButtonProps ?: Button . $props ;
263263
264264 /**
265265 * The cancel button props, follow jsx rules
266266 * @type object
267267 */
268- cancelButtonProps ?: { props : Button ; on : { } } ;
268+ cancelButtonProps ?: Button . $props ;
269269
270270 /**
271271 * The modal dialog's title
You can’t perform that action at this time.
0 commit comments