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.

SectionLoader.js 418B

1234567891011121314151617181920
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. const SectionLoader = ({ children, isLoading }) => (
  4. <div className="c-loader__wrapper">
  5. {children}
  6. {isLoading && (
  7. <div className="c-loader">
  8. <div className="c-loader__icon" />
  9. </div>
  10. )}
  11. </div>
  12. );
  13. SectionLoader.propTypes = {
  14. children: PropTypes.node,
  15. isLoading: PropTypes.bool,
  16. };
  17. export default SectionLoader;