Skip to content

Commit 747758c

Browse files
authored
Merge pull request #460 from Swastik19Nit/props
2 parents 74febb7 + 52b77cd commit 747758c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

apps/web/components/Input.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,14 @@ export const Input = (props: InputProps) => {
4343
name: props.name,
4444
id: props.name,
4545
placeholder: props.placeholder,
46-
rows: props.rows,
47-
minRows: props.autosizeTextarea ? props.rows : undefined,
48-
maxRows: props.autosizeTextarea ? props.maxRows : undefined,
46+
...(props.autosizeTextarea
47+
? {
48+
minRows: props.rows,
49+
maxRows: props.maxRows,
50+
}
51+
: {
52+
rows: props.rows,
53+
}),
4954
min: props.min,
5055
max: props.max,
5156
step: props.step,

0 commit comments

Comments
 (0)