next-helios-fe 1.9.5 → 1.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -8,6 +8,7 @@ interface CarouselProps {
|
|
8
8
|
variant?: "basic" | "primary";
|
9
9
|
interval?: number;
|
10
10
|
pauseOnHover?: boolean;
|
11
|
+
disableAutoSlide?: boolean;
|
11
12
|
disablePadding?: boolean;
|
12
13
|
};
|
13
14
|
}
|
@@ -24,13 +25,15 @@ export const Carousel: React.FC<CarouselProps> = ({ children, options }) => {
|
|
24
25
|
<Cr
|
25
26
|
slideInterval={options?.interval || 5000}
|
26
27
|
pauseOnHover={options?.pauseOnHover ?? false}
|
28
|
+
slide={options?.disableAutoSlide ? false : true}
|
29
|
+
draggable={false}
|
27
30
|
theme={{
|
28
31
|
root: {
|
29
32
|
base: "relative h-full w-full shadow-md",
|
30
33
|
leftControl:
|
31
|
-
|
34
|
+
`absolute left-0 top-0 flex h-full items-center justify-center px-4 focus:outline-none ${childrenList?.length < 2 && "hidden" }`,
|
32
35
|
rightControl:
|
33
|
-
|
36
|
+
`absolute right-0 top-0 flex h-full items-center justify-center px-4 focus:outline-none ${childrenList?.length < 2 && "hidden" }`,
|
34
37
|
},
|
35
38
|
indicators: {
|
36
39
|
active: {
|
@@ -41,7 +44,7 @@ export const Carousel: React.FC<CarouselProps> = ({ children, options }) => {
|
|
41
44
|
on: options?.variant === "primary" ? "bg-white" : "bg-primary",
|
42
45
|
},
|
43
46
|
base: "h-3 w-3 rounded-full",
|
44
|
-
wrapper: `absolute bottom-4 left-1/2 flex -translate-x-1/2 space-x-3 px-2 py-0.5 rounded-full ${
|
47
|
+
wrapper: `absolute bottom-4 left-1/2 flex -translate-x-1/2 space-x-3 px-2 py-0.5 rounded-full ${childrenList?.length < 2 && "hidden" } ${
|
45
48
|
options?.variant === "primary"
|
46
49
|
? "bg-white/30"
|
47
50
|
: "bg-primary-transparent"
|