@sledge-app/react-instant-search 0.0.102 → 0.0.104
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.
|
@@ -2413,22 +2413,19 @@ const ScrollArea = ({ children, isLoading = false, className = "", withCorner =
|
|
|
2413
2413
|
};
|
|
2414
2414
|
const SkeletonLoading$1 = "";
|
|
2415
2415
|
const SkeletonItem = ({ width, height, rounded, color, style = {}, className = "", ...otherProps }) => {
|
|
2416
|
-
|
|
2416
|
+
var _a, _b, _c, _d, _e;
|
|
2417
2417
|
const [dataSettings, setDataSettings] = React__default.useState({});
|
|
2418
|
-
const
|
|
2419
|
-
const { main_color } = colors || {};
|
|
2420
|
-
const handleSettings = () => {
|
|
2418
|
+
const handleSettings = async (LOCAL_STORAGE_GENERAL_SETTING) => {
|
|
2421
2419
|
let response;
|
|
2422
|
-
response = JSON.parse(
|
|
2420
|
+
response = JSON.parse(LOCAL_STORAGE_GENERAL_SETTING);
|
|
2423
2421
|
if (!response)
|
|
2424
2422
|
return;
|
|
2425
|
-
setIsLoading(false);
|
|
2426
2423
|
setDataSettings(response);
|
|
2427
2424
|
};
|
|
2428
2425
|
React__default.useEffect(() => {
|
|
2429
|
-
handleSettings();
|
|
2426
|
+
handleSettings(localStorage.getItem(LOCAL_STORAGE_KEY.GENERAL_SETTING) || "");
|
|
2430
2427
|
}, []);
|
|
2431
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children:
|
|
2428
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: ((_a = dataSettings == null ? void 0 : dataSettings.skeleton) == null ? void 0 : _a.enable) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2432
2429
|
"div",
|
|
2433
2430
|
{
|
|
2434
2431
|
className: `sledge__skeleton-item sledge__skeleton-item-animation ${className}`,
|
|
@@ -2437,8 +2434,8 @@ const SkeletonItem = ({ width, height, rounded, color, style = {}, className = "
|
|
|
2437
2434
|
width,
|
|
2438
2435
|
height
|
|
2439
2436
|
},
|
|
2440
|
-
...main_color && {
|
|
2441
|
-
background: main_color
|
|
2437
|
+
...((_c = (_b = dataSettings == null ? void 0 : dataSettings.skeleton) == null ? void 0 : _b.colors) == null ? void 0 : _c.main_color) && {
|
|
2438
|
+
background: (_e = (_d = dataSettings == null ? void 0 : dataSettings.skeleton) == null ? void 0 : _d.colors) == null ? void 0 : _e.main_color
|
|
2442
2439
|
},
|
|
2443
2440
|
...style
|
|
2444
2441
|
},
|