Skip to content

Commit

Permalink
Add optional props.rows to <InputText>
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed Nov 19, 2024
1 parent 7f8575b commit a91330c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/input-text/src/InputText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export type Props = {
placeholder?: string;
readOnly?: boolean;
required?: boolean;
rows?: number;
/** If true, the contents of the input are selected when it’s focused. */
selectTextOnFocus?: boolean;
size?: number;
Expand Down Expand Up @@ -95,6 +96,7 @@ export default React.forwardRef<HTMLInputElement, Props>(function InputText(
placeholder,
readOnly,
required,
rows = 1,
selectTextOnFocus,
size,
style,
Expand Down Expand Up @@ -273,7 +275,7 @@ export default React.forwardRef<HTMLInputElement, Props>(function InputText(
tabIndex={tabIndex}
title={title}
type={type}
{...(multiLine ? { onInput: setInputHeight, rows: 1 } : { max, min, step })}
{...(multiLine ? { onInput: setInputHeight, rows } : { max, min, step })}
/>
);
});
Expand Down

0 comments on commit a91330c

Please sign in to comment.