@etsoo/react 1.5.31 → 1.5.32
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/mu/NotifierMU.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare class NotifierMU extends NotifierReact {
|
|
|
29
29
|
* @param className Style class name
|
|
30
30
|
* @returns Provider
|
|
31
31
|
*/
|
|
32
|
-
static setup(className?: string): React.FunctionComponent<import("../notifier/Notifier").NotificationReactRenderProps
|
|
32
|
+
static setup(className?: string): React.FunctionComponent<React.PropsWithChildren<import("../notifier/Notifier").NotificationReactRenderProps>>;
|
|
33
33
|
private static getOrigin;
|
|
34
34
|
/**
|
|
35
35
|
* Create align container
|
|
@@ -125,6 +125,6 @@ export declare abstract class NotifierReact extends NotificationContainer<React.
|
|
|
125
125
|
* @param className Style class name
|
|
126
126
|
* @returns Provider
|
|
127
127
|
*/
|
|
128
|
-
createProvider(className?: string): React.FunctionComponent<NotificationReactRenderProps
|
|
128
|
+
createProvider(className?: string): React.FunctionComponent<React.PropsWithChildren<NotificationReactRenderProps>>;
|
|
129
129
|
}
|
|
130
130
|
export {};
|
package/lib/states/IState.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAction, IState, UserKey } from '@etsoo/appscript';
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* State UI creator
|
|
5
5
|
*/
|
|
@@ -42,10 +42,6 @@ export interface IProviderUpdate<A extends IAction> {
|
|
|
42
42
|
* State provider props
|
|
43
43
|
*/
|
|
44
44
|
export interface IProviderProps<A extends IAction> {
|
|
45
|
-
/**
|
|
46
|
-
* Children
|
|
47
|
-
*/
|
|
48
|
-
children?: ReactNode | undefined;
|
|
49
45
|
/**
|
|
50
46
|
* Update callback
|
|
51
47
|
*/
|
package/lib/states/State.d.ts
CHANGED
|
@@ -13,6 +13,6 @@ export declare class State {
|
|
|
13
13
|
*/
|
|
14
14
|
static create<S extends IState, A extends IAction, U extends IUpdate<S, A>, P extends IProviderProps<A>>(reducer: React.Reducer<S, A>, initState: S, calls: U, uiCreator?: IUICreator<S, A, P>): {
|
|
15
15
|
context: React.Context<U>;
|
|
16
|
-
provider: React.FunctionComponent<P
|
|
16
|
+
provider: React.FunctionComponent<React.PropsWithChildren<P>>;
|
|
17
17
|
};
|
|
18
18
|
}
|
package/package.json
CHANGED
package/src/states/IState.ts
CHANGED
package/src/states/State.tsx
CHANGED
|
@@ -27,7 +27,9 @@ export class State {
|
|
|
27
27
|
const context = React.createContext(calls);
|
|
28
28
|
|
|
29
29
|
// State context provider
|
|
30
|
-
const provider: React.FunctionComponent<P
|
|
30
|
+
const provider: React.FunctionComponent<React.PropsWithChildren<P>> = (
|
|
31
|
+
props
|
|
32
|
+
) => {
|
|
31
33
|
// Destruct
|
|
32
34
|
const { children, update } = props;
|
|
33
35
|
|