Skip to content

Commit

Permalink
fix(Slider): fix items height (#1040)
Browse files Browse the repository at this point in the history
* fix(Slider): fix items height

---------

Co-authored-by: qradle <[email protected]>
  • Loading branch information
PahaN47 and qradle-yndx committed Nov 11, 2024
1 parent 4a6ce21 commit 21d5798
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/blocks/Slider/Slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ $block: '.#{$ns}SliderBlock';

.slick-slide > div {
display: flex;
width: 100%;
height: 100%;
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/blocks/SliderNew/Slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ $dotSize: 8px;
}
}

#{$root}__slide-item {
width: 100%;
height: 100%;
}

&__arrow {
position: absolute;
top: -2px;
Expand Down
7 changes: 6 additions & 1 deletion src/blocks/SliderNew/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ export const SliderNewBlock = ({
{React.Children.map(children, (elem, index) => (
<SwiperSlide className={b('slide')} key={index}>
{({isVisible}) => (
<div aria-hidden={!isA11yControlHidden && !isVisible}>{elem}</div>
<div
className={b('slide-item')}
aria-hidden={!isA11yControlHidden && !isVisible}
>
{elem}
</div>
)}
</SwiperSlide>
))}
Expand Down

0 comments on commit 21d5798

Please sign in to comment.