diff --git a/components/icon/index.jsx b/components/icon/index.jsx deleted file mode 100644 index 22a6bc58a1..0000000000 --- a/components/icon/index.jsx +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -const react_1 = require('react'); -const splitObject_1 = require('../_util/splitObject'); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = props => { - const [{ type, className = '' }, others] = splitObject_1.default(props, ['type', 'className']); - let className2 = `${className} anticon anticon-${type}`.trim(); - return ; -}; diff --git a/components/message/demo/duration.md b/components/message/demo/duration.md index f662465f2a..af1b565207 100644 --- a/components/message/demo/duration.md +++ b/components/message/demo/duration.md @@ -1,17 +1,25 @@ --- order: 2 -title: 修改延时 +title: + zh-CN: 修改延时 + en-US: Customize duration --- +## zh-CN + 自定义时长 `10s`,默认时长为 `1.5s`。 +## en-US + +Customize message display duration from default `1.5s` to `10s`. + ````jsx import { message, Button } from 'antd'; const success = function () { - message.success('这是一条成功的提示,并将于10秒后消失', 10); + message.success('This is a prompt message for success, and it will disappear in 10 seconds', 10); }; -ReactDOM.render( +ReactDOM.render( , mountNode); ```` diff --git a/components/message/demo/info.md b/components/message/demo/info.md index 16c6a24e38..918436284d 100644 --- a/components/message/demo/info.md +++ b/components/message/demo/info.md @@ -1,17 +1,25 @@ --- order: 0 -title: 普通提示 +title: + zh-CN: 普通提示 + en-US: Normal prompt --- +## zh-CN + 信息提醒反馈。 +## en-US + +Normal messages as feedbacks. + ````jsx import { message, Button } from 'antd'; const info = function () { - message.info('这是一条普通的提醒'); + message.info('This is a normal message'); }; -ReactDOM.render( +ReactDOM.render( , mountNode); ```` diff --git a/components/message/demo/loading.md b/components/message/demo/loading.md index 5d11e137cb..71a8b4d480 100644 --- a/components/message/demo/loading.md +++ b/components/message/demo/loading.md @@ -1,19 +1,27 @@ --- order: 3 -title: 加载中 +title: + zh-CN: 加载中 + en-US: Message of loading --- +## zh-CN + 进行全局 loading,异步自行移除。 +## en-US + +Display a global loading indicator, which is dismissed by itself asynchronously. + ````jsx import { message, Button } from 'antd'; const success = function () { - let hide = message.loading('正在执行中...', 0); - // 异步手动移除 + let hide = message.loading('Action in progress..', 0); + // Dismiss manually and asynchronously setTimeout(hide, 2500); }; -ReactDOM.render( +ReactDOM.render( , mountNode); ```` diff --git a/components/message/demo/other.md b/components/message/demo/other.md index 99aea5785d..c5e07f9251 100644 --- a/components/message/demo/other.md +++ b/components/message/demo/other.md @@ -1,29 +1,37 @@ --- order: 1 -title: 其他提示类型 +title: + zh-CN: 其他提示类型 + en-US: Other types of message --- +## zh-CN + 包括成功、失败、警告。 +## en-US + +Messages of success, error and warning types. + ````jsx import { message, Button } from 'antd'; const success = function () { - message.success('这是一条成功提示'); + message.success('This is a message of success'); }; const error = function () { - message.error('这是一条报错提示'); + message.error('This is a message of error'); }; const warning = function () { - message.warning('这是一条警告提示'); + message.warning('This is message of warning'); }; ReactDOM.render(