From 455a23f1bb78b056bc3549576bf15e3de444f547 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 22 Apr 2017 01:28:54 +0800 Subject: [PATCH] should only affect notification without description and with icon, #5846 --- components/notification/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/notification/index.tsx b/components/notification/index.tsx index 5dcc54fb60..c8c05e9006 100755 --- a/components/notification/index.tsx +++ b/components/notification/index.tsx @@ -3,7 +3,7 @@ import Notification from 'rc-notification'; import Icon from '../icon'; import assign from 'object-assign'; let notificationInstance; -let defaultDuration = 4.5; +let defaultDuration = 0; let defaultTop = 24; let defaultBottom = 24; let defaultPlacement = 'topRight'; @@ -120,12 +120,16 @@ function notice(args) { iconNode = ; } + const autoMarginTag = (!args.description && iconNode) + ? + : null; + getNotificationInstance(outerPrefixCls).notice({ content: (
{iconNode}
- + {autoMarginTag} {args.message}
{args.description}