Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jljsj33 committed Jul 23, 2019
1 parent 4c17eb0 commit 88c992e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
1 change: 1 addition & 0 deletions assets/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
width: 20px;
height: 60px;
margin-top: -30px;
top: 50%;
background: fade(#000, 30);
&.next {
right: 0;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rc-banner-anim",
"version": "2.2.8",
"version": "2.2.9",
"description": "banner-anim animation component for react",
"keywords": [
"react",
Expand Down
5 changes: 1 addition & 4 deletions src/Arrow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ class Arrow extends Component {
const props = { ...this.props, ...this.props.componentProps };
[
'arrowType', 'next', 'prev',
'elemHeight', 'component', 'componentProps', 'default', 'prefixCls',
'component', 'componentProps', 'default', 'prefixCls',
].forEach(key => delete props[key]);
props.className = className;
props.onClick = this.onClick;
props.style = props.style || {};
props.style.top = `${this.props.elemHeight / 2}px`;
return React.createElement(this.props.component, props, this.props.children);
}
}
Expand All @@ -38,7 +36,6 @@ Arrow.propTypes = {
default: PropTypes.bool,
next: PropTypes.func,
prev: PropTypes.func,
elemHeight: PropTypes.number,
componentProps: PropTypes.object,
};
Arrow.defaultProps = {
Expand Down
8 changes: 2 additions & 6 deletions src/BannerAnim.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,8 @@ class BannerAnim extends Component {
if (elem.length > 1) {
if (!arrow.length && this.props.arrow) {
arrow.push(
<Arrow arrowType="prev" key="arrowPrev" next={this.next} prev={this.prev} default
elemHeight={this.state.wrapperHeight}
/>,
<Arrow arrowType="next" key="arrowNext" next={this.next} prev={this.prev} default
elemHeight={this.state.wrapperHeight}
/>
<Arrow arrowType="prev" key="arrowPrev" next={this.next} prev={this.prev} default />,
<Arrow arrowType="next" key="arrowNext" next={this.next} prev={this.prev} default />
);
}
if (!thumb && this.props.thumb) {
Expand Down

0 comments on commit 88c992e

Please sign in to comment.