UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

25 lines (21 loc) 719 B
"use client"; import { utils_exports } from "../../utils/index.js"; import { useFileInput } from "../file-input/use-file-input.js"; import { useCallback } from "react"; //#region src/components/file-button/use-file-button.ts const useFileButton = (props = {}) => { const { interactive, clickableProps, getInputProps } = useFileInput(props); return { clickableProps, getButtonProps: useCallback((props$1) => ({ ...clickableProps, "aria-disabled": (0, utils_exports.ariaAttr)(!interactive), tabIndex: interactive ? clickableProps.tabIndex : -1, ...props$1 }), [clickableProps, interactive]), getInputProps }; }; //#endregion export { useFileButton }; //# sourceMappingURL=use-file-button.js.map