Skip to content

Commit

Permalink
refactor: <Timeline/> move defaultProps into single destructuring (an…
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-matvejev authored Dec 1, 2020
1 parent 511c851 commit dda1f2b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions components/timeline/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const Timeline: TimelineType = props => {
pendingDot,
children,
className,
reverse,
mode,
reverse = false,
mode = '' as TimelineProps['mode'],
...restProps
} = props;
const prefixCls = getPrefixCls('timeline', customizePrefixCls);
Expand Down Expand Up @@ -99,9 +99,4 @@ const Timeline: TimelineType = props => {

Timeline.Item = TimelineItem;

Timeline.defaultProps = {
reverse: false,
mode: '' as TimelineProps['mode'],
};

export default Timeline;

0 comments on commit dda1f2b

Please sign in to comment.