Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions src/blocks/Slider/Slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ $fullscreenArrowArea: 120px;
}
}

$dotsCn: '.swiper-container-horizontal .swiper-pagination-bullets';
$wrapperCn: '.swiper-wrapper';

$dotSize: 8px;
Expand Down Expand Up @@ -191,7 +190,7 @@ $dotSize: 8px;

padding: 0;

& #{$dotsCn} {
#{$root}__dots {
bottom: $indentSM;
}

Expand Down Expand Up @@ -224,7 +223,7 @@ $dotSize: 8px;
}
}

& #{$dotsCn} {
#{$root}__dots {
left: $indentSM;
width: calc(100% - $indentSM);
}
Expand All @@ -242,7 +241,7 @@ $dotSize: 8px;
position: relative;
}

& #{$dotsCn} {
#{$root}__dots {
bottom: $indentM;
}

Expand Down Expand Up @@ -336,7 +335,7 @@ $dotSize: 8px;
height: 100vh;
margin: 0;

& .swiper-pagination {
#{$root}__dots {
bottom: 11px;
}

Expand Down
1 change: 1 addition & 0 deletions src/blocks/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const SliderBlock = ({
enabled: dots,
isA11yControlHidden,
controlTabIndex,
horizontalClass: b('dots'),
bulletClass: b('dot', dotsClassName),
bulletActiveClass: b('dot_active'),
paginationLabel: i18n('pagination-label'),
Expand Down
12 changes: 10 additions & 2 deletions src/blocks/Slider/useSliderPagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const useSliderPagination = (props: {
enabled: boolean;
isA11yControlHidden: boolean;
controlTabIndex: number;
horizontalClass: string;
bulletClass: string;
bulletActiveClass: string;
paginationLabel: string;
Expand All @@ -14,14 +15,21 @@ export const useSliderPagination = (props: {
return undefined;
}

const {isA11yControlHidden, controlTabIndex, bulletClass, bulletActiveClass, paginationLabel} =
props;
const {
isA11yControlHidden,
controlTabIndex,
bulletClass,
bulletActiveClass,
horizontalClass,
paginationLabel,
} = props;

return {
pagination: {
clickable: true,
bulletClass,
bulletActiveClass,
horizontalClass,
},
onPaginationUpdate: (slider) => {
const pagination = slider.pagination.el;
Expand Down