diff --git a/components/timeline/Timeline.jsx b/components/timeline/Timeline.jsx
index 5af678d587..3db9e4ac72 100644
--- a/components/timeline/Timeline.jsx
+++ b/components/timeline/Timeline.jsx
@@ -8,14 +8,15 @@ export default class Timeline extends React.Component {
}
render() {
- const { prefixCls, children, pending } = this.props;
+ const { prefixCls, children, pending, className, ...restProps } = this.props;
const pendingNode = typeof pending === 'boolean' ? null : pending;
- const className = classNames({
+ const classString = classNames({
[prefixCls]: true,
[`${prefixCls}-pending`]: !!pending,
+ [className]: className,
});
return (
-
+
{
React.Children.map(children, (ele, idx) =>
React.cloneElement(ele, {
diff --git a/components/timeline/TimelineItem.jsx b/components/timeline/TimelineItem.jsx
index 23f88694fc..fb3394944b 100644
--- a/components/timeline/TimelineItem.jsx
+++ b/components/timeline/TimelineItem.jsx
@@ -10,14 +10,15 @@ export default class TimelineItem extends React.Component {
}
render() {
- const { prefixCls, color, last, children, pending } = this.props;
+ const { prefixCls, color, last, children, pending, className, ...restProps } = this.props;
const itemClassName = classNames({
[`${prefixCls}-item`]: true,
[`${prefixCls}-item-last`]: last,
[`${prefixCls}-item-pending`]: pending,
+ [className]: className,
});
return (
- -
+
-
{children}
diff --git a/style/components/timeline.less b/style/components/timeline.less
index 9410c9a1f8..cf9da41efd 100644
--- a/style/components/timeline.less
+++ b/style/components/timeline.less
@@ -5,9 +5,15 @@
@timeline-color: @border-color-split;
.@{timeline-prefix-cls} {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+
&-item {
position: relative;
- padding-bottom: 12px;
+ padding: 0 0 12px 0;
+ list-style: none;
+ margin: 0;
&-tail {
position: absolute;