UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

64 lines (63 loc) 2 kB
/** * MSKCC DSM 2021, 2023 */ /// <reference types="react" /> import PropTypes from 'prop-types'; import { ReactAttr } from '../../types/common'; export type FilenameStatus = 'edit' | 'complete' | 'uploading'; export interface FilenameProps extends Omit<ReactAttr<HTMLElement>, 'tabIndex'> { /** * Specify an id that describes the error to be read by screen readers when the filename is invalid */ ['aria-describedby']?: string; /** * Provide a description of the SVG icon to denote file upload status */ iconDescription?: string; /** * Specify if the file is invalid */ invalid?: boolean; /** * Name of the uploaded file */ name?: string; /** * Status of the file upload */ status?: FilenameStatus; /** * Provide a custom tabIndex value for the `<Filename>` */ tabIndex?: number | string; } declare function Filename({ iconDescription, status, invalid, name, ['aria-describedby']: ariaDescribedBy, ...rest }: FilenameProps): JSX.Element | null; declare namespace Filename { var propTypes: { /** * Specify an id that describes the error to be read by screen readers when the filename is invalid */ "aria-describedby": PropTypes.Requireable<string>; /** * Provide a description of the SVG icon to denote file upload status */ iconDescription: PropTypes.Requireable<string>; /** * Specify if the file is invalid */ invalid: PropTypes.Requireable<boolean>; /** * Name of the uploaded file */ name: PropTypes.Requireable<string>; /** * Status of the file upload */ status: PropTypes.Requireable<string>; /** * Provide a custom tabIndex value for the `<Filename>` */ tabIndex: PropTypes.Requireable<NonNullable<string | number | null | undefined>>; }; } export default Filename;