From eb2a02618f2d8d58d04cb9184046a4768460dc1a Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 23 Jan 2017 16:09:34 +0800 Subject: [PATCH] update steps API --- components/steps/demo/customized-progress-dot.md | 9 +++++---- components/steps/index.en-US.md | 2 +- components/steps/index.zh-CN.md | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/steps/demo/customized-progress-dot.md b/components/steps/demo/customized-progress-dot.md index f21f0fdc68..a90bffb4f0 100644 --- a/components/steps/demo/customized-progress-dot.md +++ b/components/steps/demo/customized-progress-dot.md @@ -17,10 +17,11 @@ You can customize the display for Steps with progress dot style. import { Steps, Popover } from 'antd'; const Step = Steps.Step; -const customDot = (dot, stepObj) => { - const content = status: {stepObj.status}; - return {dot}; -}; +const customDot = (dot, { status, index }) => ( + step {index} status: {status}}> + {dot} + +); ReactDOM.render( diff --git a/components/steps/index.en-US.md b/components/steps/index.en-US.md index 3baa62b829..8861fbc9c0 100644 --- a/components/steps/index.en-US.md +++ b/components/steps/index.en-US.md @@ -31,7 +31,7 @@ current | to set the current step, counting from 0. You can overwrite this state status | to specify the status of current step, can be set to one of the following values: `wait` `process` `finish` `error` | String | `process` size | to specify the size of the step bar, `default` and `small` are currently supported | String | `default` direction | to specify the direction of the step bar, `horizontal` and `vertical` are currently supported | String | horizontal -progressDot | Steps with progress dot style | Boolean or Function(iconDot, {index, status, title, description}), by setting to a Function, you can customize the progress dot | false +progressDot | Steps with progress dot style, customize the progress dot by setting it to a function | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false ### Steps.Step diff --git a/components/steps/index.zh-CN.md b/components/steps/index.zh-CN.md index a2f9610eb9..edebf296f9 100644 --- a/components/steps/index.zh-CN.md +++ b/components/steps/index.zh-CN.md @@ -32,7 +32,7 @@ title: Steps | status | 指定当前步骤的状态,可选 `wait` `process` `finish` `error` | String | process | | size | 指定大小,目前支持普通(`default`)和迷你(`small`)| String | default | | direction | 指定步骤条方向。目前支持水平(`horizontal`)和竖直(`vertical`)两种方向 | String | horizontal | -| progressDot | 点状步骤条 | Boolean or Function(iconDot, {index, status, title, description}), 配置为 Function 时可自定义步骤点 | false | +| progressDot | 点状步骤条,可以设置为一个 function | Boolean or (iconDot, {index, status, title, description}) => ReactNode | false | ### Steps.Step