From cec56b40bf002f006f0cd1e681e150a579ef4c05 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 18 Apr 2016 16:17:16 +0800 Subject: [PATCH] fix Timeline className and style --- components/timeline/Timeline.jsx | 7 ++++--- components/timeline/TimelineItem.jsx | 5 +++-- style/components/timeline.less | 8 +++++++- 3 files changed, 14 insertions(+), 6 deletions(-) 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 ( -