Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
picodoth committed Jun 12, 2018
1 parent 4f79980 commit d260d72
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
9 changes: 9 additions & 0 deletions src/SaveRef.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';

export default class SaveRef extends React.Component {
getRef = (name) => {
Expand All @@ -17,3 +18,11 @@ export default class SaveRef extends React.Component {
return this.props.children(this.saveRef, this.getRef);
}
}

SaveRef.propTypes = {
children: PropTypes.function,
};

SaveRef.defaultProps = {
children: () => null,
};
2 changes: 1 addition & 1 deletion src/SwipeableInkTabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SwipeableTabBarNode from './SwipeableTabBarNode';
import TabBarSwipeableTabs from './TabBarSwipeableTabs';
import TabBarRootNode from './TabBarRootNode';
import InkTabBarNode from './InkTabBarNode';
import SaveRef from './SaveRef'
import SaveRef from './SaveRef';

export default class SwipeableInkTabBar extends React.Component {
render() {
Expand Down
8 changes: 4 additions & 4 deletions src/TabBarTabsNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ export default class TabBarTabsNode extends React.Component {

TabBarTabsNode.propTypes = {
activeKey: PropTypes.string.isRequired,
panels: PropTypes.arrayOf(PropTypes.node),
panels: PropTypes.arrayOf(PropTypes.node),
prefixCls: PropTypes.string,
tabBarGutter: PropTypes.number,
onTabClick: PropTypes.func,
saveRef: PropTypes.func,
saveRef: PropTypes.func,
};

TabBarTabsNode.defaultProps = {
panels: [],
prefixCls: [],
tabBarGutter: null,
tabBarGutter: null,
onTabClick: () => {},
saveRef: () => {},
saveRef: () => {},
};
2 changes: 1 addition & 1 deletion src/TabContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class TabContent extends React.Component {
</div>
);
}
};
}

TabContent.propTypes = {
animated: PropTypes.bool,
Expand Down
4 changes: 3 additions & 1 deletion src/TabPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class TabPane extends React.Component {
</div>
);
}
};
}

TabPane.propTypes = {
className: PropTypes.string,
Expand All @@ -39,6 +39,8 @@ TabPane.propTypes = {
destroyInactiveTabPane: PropTypes.bool,
forceRender: PropTypes.bool,
placeholder: PropTypes.node,
rootPrefixCls: PropTypes.string,
children: React.ReactNode,
};

TabPane.defaultProps = {
Expand Down

0 comments on commit d260d72

Please sign in to comment.