From 92f59d5a761a6e645cf2eec630dc2802217fc22f Mon Sep 17 00:00:00 2001 From: Sergiy Date: Mon, 19 Aug 2024 17:12:06 +0300 Subject: [PATCH] OV-6: * loaderOverlay component --- frontend/src/bundles/common/components/components.ts | 2 +- .../loader-overlay.tsx => overlay/overlay.tsx} | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) rename frontend/src/bundles/common/components/{loader-overlay/loader-overlay.tsx => overlay/overlay.tsx} (73%) diff --git a/frontend/src/bundles/common/components/components.ts b/frontend/src/bundles/common/components/components.ts index 6bf7bee06..c453d5f1a 100644 --- a/frontend/src/bundles/common/components/components.ts +++ b/frontend/src/bundles/common/components/components.ts @@ -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, diff --git a/frontend/src/bundles/common/components/loader-overlay/loader-overlay.tsx b/frontend/src/bundles/common/components/overlay/overlay.tsx similarity index 73% rename from frontend/src/bundles/common/components/loader-overlay/loader-overlay.tsx rename to frontend/src/bundles/common/components/overlay/overlay.tsx index 018ca7a06..f1fc4e5ee 100644 --- a/frontend/src/bundles/common/components/loader-overlay/loader-overlay.tsx +++ b/frontend/src/bundles/common/components/overlay/overlay.tsx @@ -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 ( { justifyContent="center" alignItems="center" > - + {children} ); }; -export { LoaderOverlay }; +export { Overlay };