diff --git a/src/components/LoaderPortal.tsx b/src/components/LoaderPortal.tsx index 770c37a..66bce54 100755 --- a/src/components/LoaderPortal.tsx +++ b/src/components/LoaderPortal.tsx @@ -3,12 +3,19 @@ import { HTMLAttributes } from 'react' import { Loader } from '@components/icons' type LoaderPortalProps = HTMLAttributes & { + /** Показать ли загрузку */ show?: boolean, + /** Затемнять ли дочерний блок */ fade?: boolean, + /** Параметры спиннера */ spinnerProps?: HTMLAttributes, + /** Заполнять ли контент на 100% */ fillContent?: boolean } +/** + * @description Добавляет оверлей загрузки над обёрнутым блоком + */ export const LoaderPortal: React.FC = ({ className = '', show, fade = true, children, spinnerProps, fillContent, ...other }) => (
{children}
diff --git a/src/styles/components/loader.css b/src/styles/components/loader.css index 33a233a..e0652de 100644 --- a/src/styles/components/loader.css +++ b/src/styles/components/loader.css @@ -58,9 +58,9 @@ place-self: center; align-self: center; justify-self: center; - z-index: 1; + z-index: 1; height: 80px; - width: 80px; + width: 80px; border-radius: 40px; } @@ -71,6 +71,6 @@ background-color: rgba(255, 255, 255, 0.4); align-self: stretch; justify-self: stretch; - z-index: 1; + z-index: 1; box-shadow: 0px 0px 6px 5px rgba(255, 254, 254, 0.4); }