From 0ae1c5e27299328e8343df940b912328f197e759 Mon Sep 17 00:00:00 2001 From: Andrew Patton Date: Mon, 8 Jan 2024 12:53:11 -0800 Subject: [PATCH] :memo: Add jsdoc for custom InputText props --- packages/input-text/src/InputText.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/input-text/src/InputText.tsx b/packages/input-text/src/InputText.tsx index f4da9587..245a38ab 100644 --- a/packages/input-text/src/InputText.tsx +++ b/packages/input-text/src/InputText.tsx @@ -10,6 +10,10 @@ export type Props = { disabled?: boolean; enterKeyHint?: InputHTMLAttributes['enterKeyHint']; form?: string; + /** + * The initial value of the text input. If props.initialValue changes at + * any point, the new value will override the local state of the input. + */ initialValue?: string; list?: string; max?: number; @@ -17,6 +21,10 @@ export type Props = { maxLength?: number; min?: number; minLength?: number; + /** + * If true, input renders as a textarea element that automatically grows + * and shrinks to adjust to the length of its contents. + */ multiLine?: boolean; multiple?: boolean; name?: string; @@ -29,10 +37,15 @@ export type Props = { placeholder?: string; readOnly?: boolean; required?: boolean; + /** If true, the contents of the input are selected when it’s focused. */ selectTextOnFocus?: boolean; size?: number; step?: number; style?: React.CSSProperties; + /** + * If true, pressing enter/return submits the
that the input is a + * part of, or else blurs the input if no form is found. + */ submitOnEnter?: boolean; tabIndex?: number; title?: string;