-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'alpha' of https://github.com/JoseVSeb/react-hook-form-i…
…nputs into alpha
- Loading branch information
Showing
9 changed files
with
3,332 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/// <reference types="react" /> | ||
import { TextFieldProps } from "@mui/material/TextField"; | ||
import { ControllerRenderProps, FieldPath, FieldValues, UseControllerProps } from "react-hook-form"; | ||
type TextFieldRenderProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Pick<ControllerRenderProps<TFieldValues, TName>, "name" | "onBlur" | "onChange" | "value" | "disabled"> & Required<Pick<TextFieldProps, "inputRef" | "error">> & Pick<TextFieldProps, "helperText">; | ||
type UseTextFieldControllerReturn<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = { | ||
textFieldProps: TextFieldRenderProps<TFieldValues, TName>; | ||
}; | ||
export declare const useTextFieldController: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: UseControllerProps<TFieldValues, TName>) => UseTextFieldControllerReturn<TFieldValues, TName>; | ||
export declare const TextFieldController: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ children, ...props }: UseControllerProps<TFieldValues, TName> & { | ||
children: (props: UseTextFieldControllerReturn<TFieldValues, TName>) => React.ReactElement; | ||
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>; | ||
export {}; | ||
//# sourceMappingURL=TextFieldController.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./TextFieldController"; | ||
//# sourceMappingURL=index.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters