UNPKG

@openshift-console/dynamic-plugin-sdk

Version:

Provides core APIs, types and utilities used by dynamic plugins at runtime.

11 lines (10 loc) 561 B
import { Extension, ExtensionDeclaration, CodeRef } from '../types'; /** This extension can be used to provide a handler for the file drop action on specific file extensions. */ export type FileUpload = ExtensionDeclaration<'console.file-upload', { /** Supported file extensions. */ fileExtensions: string[]; /** Function which handles the file drop action. */ handler: CodeRef<FileUploadHandler>; }>; export declare const isFileUpload: (e: Extension) => e is FileUpload; export type FileUploadHandler = (file: File, namespace: string) => void;