UNPKG

@nexusui/components

Version:

These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.

2 lines (1 loc) 462 B
import{jsx as n}from"react/jsx-runtime";import{useMemo as o}from"react";import{LoadingPanel as e}from"../../LoadingPanel/LoadingPanel.container.js";const t=(t,r="spinner")=>{const i=o((()=>n(e,{open:t??!1,sx:{position:"absolute",pointerEvents:"none"},onClick:n=>n.stopPropagation()})),[t]);return{cardLoadingStyle:t?{position:"relative",pointerEvents:"none","& *":{pointerEvents:"none"}}:{},renderLoadingPanel:"spinner"===r?i:null}};export{t as useCardLoading};