diff --git a/packages/components/input/src/textarea.tsx b/packages/components/input/src/textarea.tsx index bd94deb118..3bf3772268 100644 --- a/packages/components/input/src/textarea.tsx +++ b/packages/components/input/src/textarea.tsx @@ -90,14 +90,14 @@ const Textarea = forwardRef<"textarea", TextAreaProps>( getErrorMessageProps, } = useInput({...otherProps, ref, isMultiline: true}); - const [isTwoRows, setIsTwoRows] = useState(minRows > 1); + const [hasMultipleRows, setIsHasMultipleRows] = useState(minRows > 1); const [isLimitReached, setIsLimitReached] = useState(false); const labelContent = ; const inputProps = getInputProps(); const handleHeightChange = (height: number, meta: TextareaHeightChangeMeta) => { if (minRows === 1) { - setIsTwoRows(height >= meta.rowHeight * 2); + setIsHasMultipleRows(height >= meta.rowHeight * 2); } if (maxRows > minRows) { const limitReached = height >= maxRows * meta.rowHeight; @@ -139,7 +139,7 @@ const Textarea = forwardRef<"textarea", TextAreaProps>( return ( {shouldLabelBeOutside ? labelContent : null} -
+
{shouldLabelBeInside ? labelContent : null} {innerWrapper}
diff --git a/packages/core/theme/src/components/input.ts b/packages/core/theme/src/components/input.ts index 60e91e61cf..26c701190a 100644 --- a/packages/core/theme/src/components/input.ts +++ b/packages/core/theme/src/components/input.ts @@ -858,7 +858,7 @@ const input = tv({ isMultiline: true, radius: "full", class: { - inputWrapper: "data-[two-rows=true]:rounded-large", + inputWrapper: "data-[has-multiple-rows=true]:rounded-large", }, }, ],