@vrobots/storybook 0.2.8 → 0.2.9
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/package.json
CHANGED
|
@@ -6,8 +6,5 @@ export interface ILoaderProps {
|
|
|
6
6
|
hideBackground?: boolean;
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export declare const useLoader: () =>
|
|
10
|
-
isLoading: boolean;
|
|
11
|
-
setIsLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12
|
-
};
|
|
9
|
+
export declare const useLoader: () => [boolean, React.Dispatch<React.SetStateAction<boolean>>];
|
|
13
10
|
export declare const Loader: ({ isLoading, isFullscreen, component, hideBackground, children }: ILoaderProps) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,11 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Spinner } from "@chakra-ui/react";
|
|
3
3
|
import React from "react";
|
|
4
4
|
export const useLoader = () => {
|
|
5
|
-
|
|
6
|
-
return {
|
|
7
|
-
isLoading,
|
|
8
|
-
setIsLoading,
|
|
9
|
-
};
|
|
5
|
+
return React.useState(false);
|
|
10
6
|
};
|
|
11
7
|
export const Loader = ({ isLoading, isFullscreen, component, hideBackground, children }) => {
|
|
12
8
|
if (!!isLoading) {
|