UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

29 lines (28 loc) 1.06 kB
import React from "react"; import "wicg-inert"; import { SpinnerProps } from "./../Spinner/Spinner"; export interface InteractionGateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "inert"> { /** * Prevent interaction with sub elements and narrow them in their visibility. */ inert?: boolean; /** * Displays a spinner centered over the sub element. */ showSpinner?: boolean; /** * Configure the included `<Spinner />` element. */ spinnerProps?: SpinnerProps; /** * Do not use own wrapper element to set the position of the spinner element, if used. * Use the positioning of the parent container. */ useParentPositioning?: boolean; } /** * Wrap content that need to be blocked from user interactions * It also has options to display a spinner as overlay. */ export declare const InteractionGate: ({ children, className, inert, showSpinner, spinnerProps, useParentPositioning, ...otherProps }: InteractionGateProps) => React.JSX.Element; export default InteractionGate;