Skip to content

Commit

Permalink
fix: carousel centered
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-kallavus committed Nov 25, 2020
1 parent 25f3dca commit c1978ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/components/src/carousel/Carousel.tsx
Expand Up @@ -25,7 +25,6 @@ const currentScrollingSpec = `@supports (scroll-snap-align: start)`;
const CarouselWrapper = styled.div<any>({
position: 'relative',
width: '100%',
// overflowX: 'auto',
});

/**
Expand Down
Expand Up @@ -26,8 +26,8 @@ const findFirstVisibleIndex = (childRefs: any[]): any => {
const scrollToIndex = (itemRef: HTMLElement, scrollIntoViewSmoothly: any) => {
if (itemRef) {
scrollIntoViewSmoothly(itemRef, {
block: 'center',
inline: 'center',
block: 'nearest',
inline: 'nearest',
behavior: 'smooth',
});
}
Expand Down

0 comments on commit c1978ba

Please sign in to comment.