@ioca/react 1.2.5 → 1.2.7
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 +20 -4
- 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 {
|
|
@@ -482,15 +483,29 @@ interface IMessage {
|
|
|
482
483
|
closable?: boolean;
|
|
483
484
|
timer?: ReturnType<typeof setTimeout>;
|
|
484
485
|
className?: string;
|
|
486
|
+
close?: () => void;
|
|
485
487
|
onShow?: () => void;
|
|
486
488
|
onHide?: () => void;
|
|
487
489
|
}
|
|
488
490
|
|
|
489
|
-
declare function message(config: IMessage | ReactNode):
|
|
491
|
+
declare function message(config: IMessage | ReactNode): {
|
|
492
|
+
instance: IMessage;
|
|
493
|
+
close: () => void;
|
|
494
|
+
};
|
|
490
495
|
declare namespace message {
|
|
491
|
-
var error: (content: ReactNode) =>
|
|
492
|
-
|
|
493
|
-
|
|
496
|
+
var error: (content: ReactNode) => {
|
|
497
|
+
instance: IMessage;
|
|
498
|
+
close: () => void;
|
|
499
|
+
};
|
|
500
|
+
var success: (content: ReactNode) => {
|
|
501
|
+
instance: IMessage;
|
|
502
|
+
close: () => void;
|
|
503
|
+
};
|
|
504
|
+
var warning: (content: ReactNode) => {
|
|
505
|
+
instance: IMessage;
|
|
506
|
+
close: () => void;
|
|
507
|
+
};
|
|
508
|
+
var one: (config: IMessage) => void;
|
|
494
509
|
}
|
|
495
510
|
|
|
496
511
|
declare function useModal(): {
|
|
@@ -715,6 +730,7 @@ interface ISwiper {
|
|
|
715
730
|
autoplay?: boolean;
|
|
716
731
|
pauseOnHover?: boolean;
|
|
717
732
|
indicator?: boolean;
|
|
733
|
+
fixedIndicator?: boolean;
|
|
718
734
|
itemHeight?: number;
|
|
719
735
|
vertical?: boolean;
|
|
720
736
|
prev?: ReactNode;
|