@mskcc/carbon-react
Version:
Carbon react components for the MSKCC DSM
66 lines (65 loc) • 2.15 kB
TypeScript
/**
* MSKCC DSM 2021, 2024
*/
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): 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;