| 123456789101112131415161718192021222324 |
- import React, { ReactNode } from 'react';
-
- interface BlockSectionLoaderProps {
- children: ReactNode;
- isLoading: boolean;
- fullHeight: boolean;
- noShadow: boolean;
- }
-
- const BlockSectionLoader: React.FC<BlockSectionLoaderProps> = ({ children, isLoading, fullHeight, noShadow }) => (
- <div
- className={`c-loader__wrapper c-loader__wrapper--block ${fullHeight ? 'c-loader__wrapper--full-height' : ''
- } ${noShadow ? 'c-loader__wrapper--no-shadow' : ''}`}
- >
- {children}
- {isLoading && (
- <div className="c-loader">
- <div className="c-loader__icon" />
- </div>
- )}
- </div>
- );
-
- export default BlockSectionLoader;
|