@carbon/react
Version:
React components for the Carbon Design System
65 lines (64 loc) • 2.19 kB
TypeScript
/**
* Copyright IBM Corp. 2016, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import PropTypes from 'prop-types';
import { type HTMLAttributes } from 'react';
export interface LoadingProps extends HTMLAttributes<HTMLDivElement> {
/**
* Specify whether you want the loading indicator to be spinning or not
*/
active?: boolean;
/**
* Provide an optional className to be applied to the containing node
*/
className?: string;
/**
* Specify a description that would be used to best describe the loading state
*/
description?: string;
/**
* @deprecated The prop `id` is no longer needed
*/
id?: string;
/**
* Specify whether you would like the small variant of <Loading>
*/
small?: boolean;
/**
* Specify whether you want the loader to be applied with an overlay
*/
withOverlay?: boolean;
}
declare function Loading({ active, className: customClassName, withOverlay, small, description, ...rest }: LoadingProps): import("react/jsx-runtime").JSX.Element;
declare namespace Loading {
var propTypes: {
/**
* Specify whether you want the loading indicator to be spinning or not
*/
active: PropTypes.Requireable<boolean>;
/**
* Provide an optional className to be applied to the containing node
*/
className: PropTypes.Requireable<string>;
/**
* Specify a description that would be used to best describe the loading state
*/
description: PropTypes.Requireable<string>;
/**
* Provide an `id` to uniquely identify the label
*/
id: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
/**
* Specify whether you would like the small variant of <Loading>
*/
small: PropTypes.Requireable<boolean>;
/**
* Specify whether you want the loader to be applied with an overlay
*/
withOverlay: PropTypes.Requireable<boolean>;
};
}
export default Loading;