From cbc725dd7f23fcb997d527a83f8cf2f80888c5f9 Mon Sep 17 00:00:00 2001 From: Aleksandar Ristic Date: Tue, 2 Apr 2024 10:02:47 +0200 Subject: [PATCH] fixup: center slider children on x axis --- src/core/Slider/Slider.stories.tsx | 2 +- src/core/Slider/component.tsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/Slider/Slider.stories.tsx b/src/core/Slider/Slider.stories.tsx index 59f444513..3475f136f 100644 --- a/src/core/Slider/Slider.stories.tsx +++ b/src/core/Slider/Slider.stories.tsx @@ -4,7 +4,7 @@ import Icon from "../Icon/component.tsx"; const Slide = ({ name }: { name: string }) => (
-
+

“Ably seamlessly absorbs sudden bursts in load during unexpected diff --git a/src/core/Slider/component.tsx b/src/core/Slider/component.tsx index 617658e0d..1e0237feb 100644 --- a/src/core/Slider/component.tsx +++ b/src/core/Slider/component.tsx @@ -74,7 +74,10 @@ const Slider = ({ children, interval = 15000 }: SliderProps) => { style={{ transform: `translateX(-${activeIndex * 100}%)` }} > {children.map((child, index) => ( -
+
{child}
))}