UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

18 lines (17 loc) 1.08 kB
import { FieldBlockWidth } from '../../FieldBlock'; import { FieldProps } from '../../types'; import { UploadFile, UploadFileNative, UploadProps } from '../../../../components/Upload'; import { SpacingProps } from '../../../../shared/types'; export type { UploadFile, UploadFileNative }; export type UploadValue = Array<UploadFile | UploadFileNative>; export type Props = Omit<FieldProps<UploadValue, UploadValue | undefined>, 'name'> & SpacingProps & { width?: Omit<FieldBlockWidth, 'medium' | 'small'>; } & Pick<Partial<UploadProps>, 'title' | 'text' | 'acceptedFileTypes' | 'filesAmountLimit' | 'fileMaxSize' | 'onFileDelete' | 'onFileClick' | 'skeleton' | 'download' | 'allowDuplicates' | 'disableDragAndDrop'> & { fileHandler?: (newFiles: UploadValue) => UploadValue | Promise<UploadValue>; }; declare function UploadComponent(props: Props): import("react/jsx-runtime").JSX.Element; declare namespace UploadComponent { var _supportsSpacingProps: boolean; } export default UploadComponent; export declare function transformFiles(value: UploadValue): UploadValue;