diff --git a/src/docs/pages/CarouselPage.tsx b/src/docs/pages/CarouselPage.tsx
index a50007e43..d5fe3a50a 100644
--- a/src/docs/pages/CarouselPage.tsx
+++ b/src/docs/pages/CarouselPage.tsx
@@ -8,55 +8,63 @@ const CarouselPage: FC = () => {
{
title: 'Default carousel',
code: (
-
-
-
-
-
-
-
+
),
},
{
title: 'Sliding interval',
code: (
-
-
-
-
-
-
-
+
),
},
{
title: 'Static carousel',
code: (
-
-
-
-
-
-
-
+
),
},
{
title: 'Custom Controls',
code: (
-
-
-
-
-
-
-
+
),
},
{
title: 'Indicators',
code: (
-
+
@@ -77,17 +85,19 @@ const CarouselPage: FC = () => {
{
title: 'Slide as anything',
code: (
-
-
- Slide 1
-
-
- Slide 2
-
-
- Slide 3
-
-
+
+
+
+ Slide 1
+
+
+ Slide 2
+
+
+ Slide 3
+
+
+
),
},
];
diff --git a/src/lib/components/Carousel/Carousel.stories.tsx b/src/lib/components/Carousel/Carousel.stories.tsx
index c2cf59dab..62a306662 100644
--- a/src/lib/components/Carousel/Carousel.stories.tsx
+++ b/src/lib/components/Carousel/Carousel.stories.tsx
@@ -8,13 +8,15 @@ export default {
} as Meta;
const Template: Story = (args) => (
-
-
-
-
-
-
-
+
);
export const Default = Template.bind({});
diff --git a/src/lib/components/Carousel/index.tsx b/src/lib/components/Carousel/index.tsx
index afc319841..dd85e1d96 100644
--- a/src/lib/components/Carousel/index.tsx
+++ b/src/lib/components/Carousel/index.tsx
@@ -34,9 +34,9 @@ export const Carousel: FC = ({
const items = useMemo(
() =>
- Children.map(children as ReactElement>[], (child: ReactElement>) =>
+ Children.map(children as ReactElement[], (child: ReactElement) =>
cloneElement(child, {
- className: theme.item.base,
+ className: classNames(theme.item.base, child.props.className),
}),
),
[children, theme.item.base],
diff --git a/src/lib/theme/default.ts b/src/lib/theme/default.ts
index 92b7a1a6a..f70c4d99a 100644
--- a/src/lib/theme/default.ts
+++ b/src/lib/theme/default.ts
@@ -240,7 +240,7 @@ export default {
},
},
carousel: {
- base: 'relative h-full w-full h-56 sm:h-64 xl:h-80 2xl:h-96',
+ base: 'relative h-full w-full',
indicators: {
active: {
off: 'bg-white/50 hover:bg-white dark:bg-gray-800/50 dark:hover:bg-gray-800',