From 46cb1c8cdee52ce9f3b6be3126958ae53ae2d927 Mon Sep 17 00:00:00 2001 From: HeskeyBaozi Date: Thu, 2 Aug 2018 18:02:43 +0800 Subject: [PATCH] resolve conflict. --- components/modal/Modal.tsx | 10 ++++- .../__snapshots__/Modal.test.js.snap | 38 ++++++++++++++++++- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx index 9d3c50541e..459f8afd48 100644 --- a/components/modal/Modal.tsx +++ b/components/modal/Modal.tsx @@ -7,12 +7,12 @@ import Button from '../button'; import { ButtonType, NativeButtonProps } from '../button/button'; import LocaleReceiver from '../locale-provider/LocaleReceiver'; import { getConfirmLocale } from './locale'; +import Icon from '../icon'; let mousePosition: { x: number, y: number } | null; let mousePositionEventBinded: boolean; export interface ModalProps { - prefixCls?: string; /** 对话框是否可见*/ visible?: boolean; /** 确定按钮 loading*/ @@ -55,6 +55,7 @@ export interface ModalProps { mask?: boolean; keyboard?: boolean; wrapProps?: any; + prefixCls?: string; } export interface ModalFuncProps { @@ -192,6 +193,12 @@ export default class Modal extends React.Component { ); + const closeIcon = ( + + + + ); + return ( { visible={visible} mousePosition={mousePosition} onClose={this.handleCancel} + closeIcon={closeIcon} /> ); } diff --git a/components/modal/__tests__/__snapshots__/Modal.test.js.snap b/components/modal/__tests__/__snapshots__/Modal.test.js.snap index 1bd7877de2..233e838026 100644 --- a/components/modal/__tests__/__snapshots__/Modal.test.js.snap +++ b/components/modal/__tests__/__snapshots__/Modal.test.js.snap @@ -26,7 +26,24 @@ exports[`Modal render correctly 1`] = ` > + > + + + +
+ > + + + +