UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

44 lines (43 loc) 1.47 kB
import * as React from 'react'; import type { PolymorphicForwardRefComponent } from '../../utils/index.js'; type FileUploadTemplateProps = { /** * Callback fired when a file is selected from the device. */ onChange?: React.ChangeEventHandler<HTMLInputElement>; /** * Whether the file input accepts multiple files. * Passed to the `multiple` attribute of native file input. * @default true */ acceptMultiple?: boolean; /** * File types allowed. * Passed to the `accept` attribute of native file input. */ acceptType?: string; /** * Localized version of primary clickable label. Gets styled like a hyperlink. * @default 'Choose a file' */ label?: React.ReactNode; /** * Localized version of the secondary text shown below the label. * @default 'or drag & drop it here.' */ subtitle?: React.ReactNode; /** * Optional children appended to the template. */ children?: React.ReactNode; }; /** * @deprecated Use [`FileUploadCard`](https://itwinui.bentley.com/docs/fileupload#fileuploadcard) instead. * * Default template to be used with the `FileUpload` wrapper component. * Contains a hidden input with styled labels (customizable). * @example * <FileUploadTemplate onChange={(e) => console.log(e.target.files)} /> */ export declare const FileUploadTemplate: PolymorphicForwardRefComponent<"div", FileUploadTemplateProps>; export {};