Skip to content

Commit 982a8e2

Browse files
Updates.
1 parent 376807d commit 982a8e2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/carousel.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@
7777
}
7878

7979
.carousel-top-arrow {
80-
top: 23px;
80+
top: 75px;
8181
}
8282

8383
.carousel-bottom-arrow {
84-
bottom: 23px;
84+
bottom: 75px;
8585
}
8686

8787
.carousel-top-arrow {

src/stories/CustomArrow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const CustomArrow = ({ nextSlide, prevSlide, overrideArrowStyle = {}, direction,
99

1010
const hasNextSlide = hasNext();
1111
return (
12-
<button disabled={ !hasNextSlide } onClick={ isTopOrLeft ? prevSlide : nextSlide } style={{ ...overrideArrowStyle, opacity: !hasNextSlide ? 0.5 : 1 }}>
12+
<button className='carousel-custom-arrow' disabled={ !hasNextSlide } onClick={ isTopOrLeft ? prevSlide : nextSlide } style={{ ...overrideArrowStyle, ...{ opacity: !hasNextSlide ? 0.5 : 1 }, ...{ cursor: !hasNextSlide ? 'not-allowed' : 'pointer' } }}>
1313
{customImage}
1414
</button>
1515
);

test/unit/carousel.tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ describe('Carousel', () => {
492492
</Carousel>);
493493

494494
const controlComponent = tree.find('.control-div');
495-
expect(controlComponent.childAt(0).html()).to.eql('<button disabled="" style="background: none; opacity: 0.5;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="m0 16.67 2.829 2.83 9.175-9.339 9.167 9.339L24 16.67 12.004 4.5z"></path></svg></button>');
496-
expect(controlComponent.childAt(1).html()).to.eql('<button style="background: none; opacity: 1;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M0 7.33 2.829 4.5l9.175 9.339L21.171 4.5 24 7.33 12.004 19.5z"></path></svg></button>');
495+
expect(controlComponent.childAt(0).html()).to.eql('<button class="carousel-custom-arrow" disabled="" style="background: none; opacity: 0.5; cursor: not-allowed;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="m0 16.67 2.829 2.83 9.175-9.339 9.167 9.339L24 16.67 12.004 4.5z"></path></svg></button>');
496+
expect(controlComponent.childAt(1).html()).to.eql('<button class="carousel-custom-arrow" style="background: none; opacity: 1; cursor: pointer;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M0 7.33 2.829 4.5l9.175 9.339L21.171 4.5 24 7.33 12.004 19.5z"></path></svg></button>');
497497

498498
});
499499

0 commit comments

Comments
 (0)