From 191fdebcaf3f7d23e345b631745e5a7e6ad6dc5b 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.tsx | 5 ++++- src/core/Slider/Slider.stories.tsx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/Slider.tsx b/src/core/Slider.tsx index f75c77fe..23da856d 100644 --- a/src/core/Slider.tsx +++ b/src/core/Slider.tsx @@ -76,7 +76,10 @@ const Slider = ({ children, interval = 15000 }: SliderProps) => { style={{ transform: `translateX(-${activeIndex * 100}%)` }} > {children.map((child, index) => ( -
+
{child}
))} diff --git a/src/core/Slider/Slider.stories.tsx b/src/core/Slider/Slider.stories.tsx index 7975c7bc..53a41031 100644 --- a/src/core/Slider/Slider.stories.tsx +++ b/src/core/Slider/Slider.stories.tsx @@ -4,7 +4,7 @@ import Icon from "../Icon.tsx"; const Slide = ({ name }: { name: string }) => (
-
+

“Ably seamlessly absorbs sudden bursts in load during unexpected