Next.js template
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BlockSectionLoader.js 663B

1234567891011121314151617181920212223242526
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. const BlockSectionLoader = ({ children, isLoading, fullHeight, noShadow }) => (
  4. <div
  5. className={`c-loader__wrapper c-loader__wrapper--block ${
  6. fullHeight ? 'c-loader__wrapper--full-height' : ''
  7. } ${noShadow ? 'c-loader__wrapper--no-shadow' : ''}`}
  8. >
  9. {children}
  10. {isLoading && (
  11. <div className="c-loader">
  12. <div className="c-loader__icon" />
  13. </div>
  14. )}
  15. </div>
  16. );
  17. BlockSectionLoader.propTypes = {
  18. children: PropTypes.node,
  19. isLoading: PropTypes.bool,
  20. fullHeight: PropTypes.bool,
  21. noShadow: PropTypes.bool,
  22. };
  23. export default BlockSectionLoader;