PHP Classes

File: src/components/loading/OverlayLoading.tsx

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   WordPress React Plugin Kit   src/components/loading/OverlayLoading.tsx   Download  
File: src/components/loading/OverlayLoading.tsx
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WordPress React Plugin Kit
Environment to develop new WordPress plugins
Author: By
Last change:
Date: 2 years ago
Size: 976 bytes
 

Contents

Class file image Download
/** * External dependencies. */ import { useSelector } from 'react-redux'; import { __ } from '@wordpress/i18n'; /** * Internal dependencies. */ import { IRootReducer } from '../../../interfaces/ReducerInterface'; const OverlayLoading = () => { const { loading, loadingText, loadingDescription } = useSelector( (state: IRootReducer) => state.global ); return loading ? ( <div className="fixed top-0 left-0 right-0 bottom-0 w-full h-screen z-50 overflow-hidden bg-gray-500 opacity-80 flex flex-col items-center justify-center bg-[#cccccce8]"> <div className="loader ease-linear rounded-full border-4 border-t-4 border-gray-200 h-12 w-12 mb-4"></div> <h2 className="text-center text-red text-xl font-semibold"> {loadingText} </h2> {loadingDescription.length > 0 && <div>{loadingDescription}</div>} </div> ) : ( <></> ); }; export default OverlayLoading;