mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
Add timeline component
This commit is contained in:
parent
37a9f72c0f
commit
c5be535a3e
0
components/timeline/demo/basic.md
Normal file
0
components/timeline/demo/basic.md
Normal file
0
components/timeline/demo/color.md
Normal file
0
components/timeline/demo/color.md
Normal file
0
components/timeline/demo/dashed.md
Normal file
0
components/timeline/demo/dashed.md
Normal file
35
components/timeline/index.jsx
Normal file
35
components/timeline/index.jsx
Normal file
@ -0,0 +1,35 @@
|
||||
import React from 'react';
|
||||
|
||||
let AntTimeline = React.createClass({
|
||||
getDefaultProps() {
|
||||
return {
|
||||
prefixCls: 'ant-timeline'
|
||||
};
|
||||
},
|
||||
render() {
|
||||
return (
|
||||
<ul className={this.props.prefixCls}>
|
||||
{this.props.children}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
AntTimeline.Item = React.createClass({
|
||||
getDefaultProps() {
|
||||
return {
|
||||
prefixCls: 'ant-timeline',
|
||||
color: 'blue',
|
||||
dashed: false
|
||||
};
|
||||
},
|
||||
render() {
|
||||
return (
|
||||
<li className={this.props.prefixCls + '-item'}>
|
||||
{this.props.children}
|
||||
</li>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
export default AntTimeline;
|
14
components/timeline/index.md
Normal file
14
components/timeline/index.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Timeline
|
||||
|
||||
- category: Components
|
||||
- chinese: 时间轴
|
||||
- type: 展示
|
||||
|
||||
---
|
||||
|
||||
垂直展示的时间流信息。
|
||||
|
||||
## 何时使用
|
||||
|
||||
- 当有一系列信息需要从上至下按时间排列时;
|
||||
- 需要有一条时间轴进行视觉上的串联时;
|
Loading…
Reference in New Issue
Block a user