@popmenu/ordering-ui 0.83.0 → 0.83.1
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.
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
declare type OrderingAppContextValue = {
|
|
3
3
|
currencySymbol?: string;
|
|
4
4
|
basePath: string;
|
|
5
5
|
restaurantId: number;
|
|
6
|
-
}
|
|
7
|
-
declare type OrderingAppContextType = [
|
|
6
|
+
};
|
|
7
|
+
declare type OrderingAppContextType = [OrderingAppContextValue, React.Dispatch<React.SetStateAction<OrderingAppContextValue>>];
|
|
8
8
|
export declare const OrderingAppContext: React.Context<OrderingAppContextType | null>;
|
|
9
9
|
export declare const useOrderingAppContext: () => OrderingAppContextType;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
10
|
+
declare type OrderingAppContextProviderProps = PropsWithChildren<{
|
|
11
|
+
defaultContext: OrderingAppContextValue;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const OrderingAppContextProvider: (props: OrderingAppContextProviderProps) => JSX.Element;
|
|
13
14
|
export {};
|
package/build/index.es.js
CHANGED
|
@@ -1508,7 +1508,7 @@ var useOrderingAppContext = function () {
|
|
|
1508
1508
|
return context;
|
|
1509
1509
|
};
|
|
1510
1510
|
var OrderingAppContextProvider = function (props) {
|
|
1511
|
-
var context = useState(
|
|
1511
|
+
var context = useState(props.defaultContext);
|
|
1512
1512
|
return React__default.createElement(OrderingAppContext.Provider, { value: context }, props.children);
|
|
1513
1513
|
};
|
|
1514
1514
|
|
package/build/index.js
CHANGED
|
@@ -1551,7 +1551,7 @@ var useOrderingAppContext = function () {
|
|
|
1551
1551
|
return context;
|
|
1552
1552
|
};
|
|
1553
1553
|
var OrderingAppContextProvider = function (props) {
|
|
1554
|
-
var context = React.useState(
|
|
1554
|
+
var context = React.useState(props.defaultContext);
|
|
1555
1555
|
return React__default['default'].createElement(OrderingAppContext.Provider, { value: context }, props.children);
|
|
1556
1556
|
};
|
|
1557
1557
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popmenu/ordering-ui",
|
|
3
|
-
"version": "0.83.
|
|
3
|
+
"version": "0.83.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Popmenu Design System Team",
|
|
6
6
|
"description": "React components specifically for the popmenu Online Ordering web app.",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"acorn-jsx": "^5.3.2"
|
|
33
33
|
},
|
|
34
34
|
"sideEffects": false,
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "517dbbfe1056b88b3fd5b2cc33ed98b1c60a9902"
|
|
36
36
|
}
|