From 9b3ac9bbd11d6ac7d7725f8811e9ed1203b75206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Sat, 17 Aug 2019 21:30:58 +0800 Subject: [PATCH] fix: model close (#18323) * :lipstick: support Modal closeIcon close #18307 * :bug: closeIcon should put into span https://github.com/ant-design/ant-design/pull/18309/files#r314946527 --- components/modal/Modal.tsx | 4 ++-- .../modal/__tests__/__snapshots__/Modal.test.js.snap | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx index 72d2d0d652..6401164a5a 100644 --- a/components/modal/Modal.tsx +++ b/components/modal/Modal.tsx @@ -223,9 +223,9 @@ export default class Modal extends React.Component { ); - const closeIconToRender = closeIcon || ( + const closeIconToRender = ( - + {closeIcon || } ); diff --git a/components/modal/__tests__/__snapshots__/Modal.test.js.snap b/components/modal/__tests__/__snapshots__/Modal.test.js.snap index 1f95fed6bd..1fc56f54e0 100644 --- a/components/modal/__tests__/__snapshots__/Modal.test.js.snap +++ b/components/modal/__tests__/__snapshots__/Modal.test.js.snap @@ -198,9 +198,13 @@ exports[`Modal support closeIcon 1`] = ` class="ant-modal-close" type="button" > - - closeIcon - + + + closeIcon + +