icons in message component use filled theme

This commit is contained in:
HeskeyBaozi 2018-09-02 18:20:17 +08:00 committed by 偏右
parent bd53700766
commit e3eb3c63a1

View File

@ -72,13 +72,14 @@ function notice(args: ArgsProps): MessageType {
return resolve(true);
};
getMessageInstance((instance) => {
const iconNode = <Icon type={iconType} theme={iconType === 'loading' ? 'outlined' : 'filled'} />;
instance.notice({
key: target,
duration,
style: {},
content: (
<div className={`${prefixCls}-custom-content${args.type ? ` ${prefixCls}-${args.type}` : ''}`}>
{args.icon ? args.icon : iconType ? <Icon type={iconType} /> : ''}
{args.icon ? args.icon : iconType ? iconNode : ''}
<span>{args.content}</span>
</div>
),