UNPKG

@grafana/ui

Version:
22 lines (21 loc) 930 B
import { FormEvent } from 'react'; import * as React from 'react'; import { ComponentSize } from '../../types/size'; export interface Props { /** Callback function to handle uploaded file */ onFileUpload: (event: FormEvent<HTMLInputElement>) => void; /** Accepted file extensions */ accept?: string; /** Overwrite or add to style */ className?: string; /** Button size */ size?: ComponentSize; /** Show the file name */ showFileName?: boolean; } /** * A button-styled input that triggers file upload popup. Button text and accepted file extensions can be customized via `label` and `accepted` props respectively. * * https://developers.grafana.com/ui/latest/index.html?path=/docs/inputs-fileupload--docs */ export declare const FileUpload: ({ onFileUpload, className, children, accept, size, showFileName, }: React.PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;