UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

15 lines (14 loc) 1.28 kB
import * as React from 'react'; import type { UseFileInputResult } from "../../../hooks/index.js"; import type { UseDropZoneStateWithoutRef } from "../../../hooks/lab/useDropZone/index.js"; import type { FileDropZoneProps } from "./types.js"; import type { FileDropZoneAccept } from "./utils.js"; interface FileDropZoneContextValue extends Pick<FileDropZoneProps, 'title' | 'description' | 'buttonText' | 'icon' | 'errorIcon' | 'errorMessage' | 'validationState' | 'disabled' | 'multiple'>, UseFileInputResult, UseDropZoneStateWithoutRef { accept: FileDropZoneAccept; onKeyDown: React.KeyboardEventHandler; isInvalidDrag: boolean; } export type FileDropZoneProviderProps = Pick<FileDropZoneProps, 'accept' | 'onUpdate' | 'onUpdateAccepted' | 'onUpdateRejected' | 'title' | 'description' | 'buttonText' | 'icon' | 'errorIcon' | 'multiple' | 'disabled' | 'errorMessage' | 'validationState' | 'children'>; export declare const FileDropZoneProvider: ({ accept, onUpdate, onUpdateAccepted, onUpdateRejected, title, description, buttonText, icon, errorIcon, disabled, errorMessage, validationState, children, multiple, }: FileDropZoneProviderProps) => import("react/jsx-runtime").JSX.Element; export declare const useFileZoneContext: () => FileDropZoneContextValue; export {};