Merge pull request #100 from ant-design/fix-message

fix message
This commit is contained in:
yiminghe 2015-07-30 21:33:34 +08:00
commit eb42ada2cd

View File

@ -3,12 +3,15 @@ import Notification from 'rc-notification';
let defaultDuration = 1.5;
var messageInstance;
function getMessageInstance() {
return Notification.newInstance({
messageInstance = messageInstance || Notification.newInstance({
prefixCls: 'ant-message',
transitionName: 'move-up',
style: {} //
});
return messageInstance;
}
function notice(content, duration = defaultDuration, type) {
@ -18,7 +21,6 @@ function notice(content, duration = defaultDuration, type) {
'error': 'anticon-exclamation-circle ant-message-error'
})[type];
getMessageInstance().notice({
key: 'simpleMessage',
duration: duration,
style: {},
content: <div className="ant-message-custom-content">