UNPKG

@carbon/react

Version:

React components for the Carbon Design System

69 lines (68 loc) 2.33 kB
/** * 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 React from 'react'; import PropTypes from 'prop-types'; export declare const InlineLoadingStatuses: readonly ["inactive", "active", "finished", "error"]; export type InlineLoadingStatus = (typeof InlineLoadingStatuses)[number]; export interface InlineLoadingProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'children'> { /** * Specify a custom className to be applied to the container node */ className?: string; /** * Specify the description for the inline loading text */ description?: React.ReactNode; /** * Specify the description for the inline loading text */ iconDescription?: string; /** * Provide an optional handler to be invoked when <InlineLoading> is * successful */ onSuccess?: () => void; /** * Specify the loading status */ status?: InlineLoadingStatus; /** * Provide a delay for the `setTimeout` for success */ successDelay?: number; } declare const InlineLoading: { ({ className, status, iconDescription, description, onSuccess, successDelay, ...rest }: InlineLoadingProps): import("react/jsx-runtime").JSX.Element; propTypes: { /** * Specify a custom className to be applied to the container node */ className: PropTypes.Requireable<string>; /** * Specify the description for the inline loading text */ description: PropTypes.Requireable<PropTypes.ReactNodeLike>; /** * Specify the description for the inline loading text */ iconDescription: PropTypes.Requireable<string>; /** * Provide an optional handler to be invoked when <InlineLoading> is * successful */ onSuccess: PropTypes.Requireable<(...args: any[]) => any>; /** * Specify the loading status */ status: PropTypes.Requireable<string>; /** * Provide a delay for the `setTimeout` for success */ successDelay: PropTypes.Requireable<number>; }; }; export default InlineLoading;