@react-md/form
Version:
This package is for creating all the different form input types.
28 lines (27 loc) • 1.18 kB
TypeScript
import type { InputHTMLAttributes } from "react";
import type { MenuItemProps } from "@react-md/menu";
import type { FileInputProps } from "../file-input/FileInput";
/**
* @remarks \@since 5.0.0
*/
export declare type MenuItemAllowedFileInputProps = Pick<FileInputProps, "id" | "onChange" | "accept" | "multiple" | "disableRepeatableFiles">;
/** @remarks \@since 5.0.0 */
export interface MenuItemFileInputProps extends Omit<MenuItemProps, "id" | "onChange">, MenuItemAllowedFileInputProps {
/**
* An `aria-label` to apply to the `<input type="file">`.
*
* @defaultValue `"Upload"`
*/
inputLabel?: string;
/**
* Any additional props that should be passed to the `<input type="file">`
* element. You probably won't ever need to use this.
*/
inputProps?: Readonly<Omit<InputHTMLAttributes<HTMLInputElement>, "type" | keyof MenuItemAllowedFileInputProps>>;
}
/**
* A wrapper for the `<input type="file">` element that works within menus.
*
* @remarks \@since 5.0.0
*/
export declare const MenuItemFileInput: import("react").ForwardRefExoticComponent<MenuItemFileInputProps & import("react").RefAttributes<HTMLLIElement>>;