import React from 'react'; import { Factory } from '../../core'; export interface FileButtonProps { ref?: React.Ref; /** Called when files are picked */ onChange: (payload: Multiple extends true ? File[] : File | null) => void; /** Function that receives button props and returns react node that should be rendered */ children: (props: { onClick: () => void; }) => React.ReactNode; /** If set, user can pick more than one file */ multiple?: Multiple; /** File input accept attribute, for example, `"image/png,image/jpeg"` */ accept?: string; /** Input name attribute */ name?: string; /** Input form attribute */ form?: string; /** Reference of the function that should be called when value changes to null or empty array */ resetRef?: React.Ref<() => void>; /** Disables file picker */ disabled?: boolean; /** Specifies that, optionally, a new file should be captured, and which device should be used to capture that new media of a type defined by the accept attribute. */ capture?: boolean | 'user' | 'environment'; /** Passes down props to the input element used to capture files */ inputProps?: React.ComponentProps<'input'>; } export type FileButtonFactory = Factory<{ props: FileButtonProps; signature: (props: FileButtonProps) => React.JSX.Element; }>; export declare const FileButton: ((props: FileButtonProps) => React.JSX.Element) & import("../..").ThemeExtend<{ props: FileButtonProps; signature: (props: FileButtonProps) => React.JSX.Element; }> & import("../..").ComponentClasses<{ props: FileButtonProps; signature: (props: FileButtonProps) => React.JSX.Element; }> & Record & import("../..").FactoryComponentWithProps<{ props: FileButtonProps; signature: (props: FileButtonProps) => React.JSX.Element; }> & { displayName?: string; }; export declare namespace FileButton { type Props = FileButtonProps; type Factory = FileButtonFactory; }