@cripty2001/utils 0.0.158 → 0.0.159
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/dist/react-ui/loader.js
CHANGED
|
@@ -19,12 +19,12 @@ if (typeof document !== 'undefined') {
|
|
|
19
19
|
}
|
|
20
20
|
function Loader(props) {
|
|
21
21
|
const data = (0, react_whispr_1.useWhisprValue)(props.data.data);
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Content, { data: data, children: props.children }) }));
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Content, { data: data, children: props.children, loader: props.loader }) }));
|
|
23
23
|
}
|
|
24
|
-
function Content({ data, children }) {
|
|
24
|
+
function Content({ data, children, loader }) {
|
|
25
25
|
const ChildComponent = children;
|
|
26
26
|
if (data.loading)
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100vh' }, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
27
|
+
return loader ?? ((0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100vh' }, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
28
28
|
animation: 'spin 1s linear infinite',
|
|
29
29
|
borderRadius: '9999px',
|
|
30
30
|
height: '3rem',
|
package/package.json
CHANGED