docs: add translation for timeline (#2190)

This commit is contained in:
lixiaochou077 2016-07-04 10:49:04 +08:00 committed by Benjy Cui
parent 1cec962d74
commit 6a616de767
6 changed files with 76 additions and 4 deletions

View File

@ -1,10 +1,18 @@
---
order: 0
title: 基本用法
title:
zh-CN: 基本用法
en-US: Basic
---
## zh-CN
基本的时间轴。
## en-US
Basic timeline.
````jsx
import { Timeline } from 'antd';

View File

@ -1,10 +1,18 @@
---
order: 1
title: 圆圈颜色
title:
zh-CN: 圆圈颜色
en-US: Color
---
## zh-CN
圆圈颜色,绿色用于已完成、成功状态,红色表示告警或错误状态,蓝色可表示正在进行或其他默认状态。
## en-US
Set the color of circles. `green` means completed or success status, `red` means warning or error, and `blue` means ongoing or other default status.
````jsx
import { Timeline } from 'antd';

View File

@ -1,10 +1,18 @@
---
order: 4
title: 自定义时间轴点
title:
zh-CN: 自定义时间轴点
en-US: Custom
---
## zh-CN
可以设置为图标或其他自定义元素。
## en-US
Set a node as an icon or other custom element.
````jsx
import { Timeline, Icon } from 'antd';

View File

@ -1,10 +1,18 @@
---
order: 2
title: 最后一个
title:
zh-CN: 最后一个
en-US: Last node
---
## zh-CN
在最后位置添加一个幽灵节点,表示时间轴未完成,还在记录过程中。可以指定 `pending={true}` 或者 `pending={一个 React 元素}`
## en-US
When the timeline is incomplete and ongoing, put a ghost node at last. set `pending={true}` or `pending={a React Element}`
````jsx
import { Timeline } from 'antd';

View File

@ -0,0 +1,40 @@
---
category: Components
type: Views
title: Timeline
---
Vertical display timeline.
## When To Use
- When a series of information need to be lined from top to bottom by time.
- When need a timeline to make a visual connection.
## API
```jsx
<Timeline>
<Timeline.Item>step1 2015-09-01</Timeline.Item>
<Timeline.Item>step2 2015-09-01</Timeline.Item>
<Timeline.Item>step3 2015-09-01</Timeline.Item>
<Timeline.Item>step4 2015-09-01</Timeline.Item>
</Timeline>
```
### Timeline
Timeline
| Property | Description | Type | Default |
|----------|----------------------------------------|------------|-------|
| pending | to set the last ghost node's existence or its content | boolean or React.Element | false |
### Timeline.Item
Node of timeline
| Property | Description | Type | Default |
|----------|------------------------------------------|------------|-------|
| color | to set the circle's color to `blue, red, green` or other custom colors | string | blue |
| dot | custom timeline dot | React.Element | - |