@ioca/react 1.2.4 → 1.2.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/lib/css/index.css +1 -1
- package/lib/css/index.css.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/types/index.d.ts +7 -3
- package/package.json +1 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ interface IButtonToggle extends IButton {
|
|
|
63
63
|
activeClass?: string;
|
|
64
64
|
after?: ReactNode;
|
|
65
65
|
disabled?: boolean;
|
|
66
|
+
toggable?: () => boolean | Promise<boolean>;
|
|
66
67
|
onToggle?: (active: boolean) => void;
|
|
67
68
|
}
|
|
68
69
|
interface IButtonGroup {
|
|
@@ -715,6 +716,7 @@ interface ISwiper {
|
|
|
715
716
|
autoplay?: boolean;
|
|
716
717
|
pauseOnHover?: boolean;
|
|
717
718
|
indicator?: boolean;
|
|
719
|
+
fixedIndicator?: boolean;
|
|
718
720
|
itemHeight?: number;
|
|
719
721
|
vertical?: boolean;
|
|
720
722
|
prev?: ReactNode;
|
|
@@ -723,20 +725,22 @@ interface ISwiper {
|
|
|
723
725
|
style?: CSSProperties;
|
|
724
726
|
className?: string;
|
|
725
727
|
children?: ReactNode;
|
|
726
|
-
renderIndicator?: (
|
|
728
|
+
renderIndicator?: (index: number) => ReactNode;
|
|
727
729
|
onBeforeSwipe?: (before: number) => void;
|
|
728
730
|
onAfterSwipe?: (after: number) => void;
|
|
731
|
+
onItemClick?: (index: number, e: MouseEvent) => void;
|
|
729
732
|
}
|
|
730
|
-
interface ISwiperItem extends Pick<ISwiper, "gap" | "itemHeight" | "vertical" | "type"> {
|
|
733
|
+
interface ISwiperItem extends Pick<ISwiper, "gap" | "itemHeight" | "vertical" | "type" | "onItemClick"> {
|
|
731
734
|
active?: boolean;
|
|
732
735
|
index?: number;
|
|
736
|
+
itemIndex?: number;
|
|
733
737
|
transition?: string;
|
|
734
738
|
style?: CSSProperties;
|
|
735
739
|
className?: string;
|
|
736
740
|
children?: ReactNode;
|
|
737
741
|
}
|
|
738
742
|
interface RefSwiper {
|
|
739
|
-
swipeTo: (
|
|
743
|
+
swipeTo: (index: number) => void;
|
|
740
744
|
swipeNext: () => void;
|
|
741
745
|
swipePrev: () => void;
|
|
742
746
|
}
|