Skip to content

Commit

Permalink
OV-6: * loaderOverlay component
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiy4 committed Aug 19, 2024
1 parent 580d235 commit 92f59d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/bundles/common/components/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export { Button } from './button/button.js';
export { Input } from './input/input.js';
export { Link } from './link/link.js';
export { Loader } from './loader/loader.js';
export { LoaderOverlay } from './loader-overlay/loader-overlay.js';
export { Overlay } from './overlay/overlay.js';
export { RouterProvider } from './router-provider/router-provider.js';
export {
Box,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Fade, Flex } from '@chakra-ui/react';

import { Loader } from '../loader/loader.js';

type Properties = {
isOpen: boolean;
children: React.ReactNode;
};

const LoaderOverlay = ({ isOpen }: Properties): JSX.Element => {
const Overlay = ({ isOpen, children }: Properties): JSX.Element => {
return (
<Fade in={isOpen}>
<Flex
Expand All @@ -18,10 +17,10 @@ const LoaderOverlay = ({ isOpen }: Properties): JSX.Element => {
justifyContent="center"
alignItems="center"
>
<Loader />
{children}
</Flex>
</Fade>
);
};

export { LoaderOverlay };
export { Overlay };

0 comments on commit 92f59d5

Please sign in to comment.