From ad42519a34128cd4a9af00b9d9213e78ecad61cf Mon Sep 17 00:00:00 2001 From: jp7107 Date: Fri, 15 May 2026 22:58:50 +0530 Subject: [PATCH 1/2] feat: add character count indicator to resume text fields (Closes #38) --- .../components/ResumeForm/Form/InputGroup.tsx | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/src/app/components/ResumeForm/Form/InputGroup.tsx b/src/app/components/ResumeForm/Form/InputGroup.tsx index 8f73b99..b50c354 100644 --- a/src/app/components/ResumeForm/Form/InputGroup.tsx +++ b/src/app/components/ResumeForm/Form/InputGroup.tsx @@ -3,7 +3,7 @@ import ContentEditable from "react-contenteditable"; import { useAutosizeTextareaHeight } from "lib/hooks/useAutosizeTextareaHeight"; interface InputProps { - label: string; + label: string | React.ReactNode; labelClassName?: string; // name is passed in as a const string. Therefore, we make it a generic type so its type can // be more restricted as a const for the first argument in onChange @@ -22,7 +22,7 @@ export const InputGroupWrapper = ({ className, children, }: { - label: string; + label: string | React.ReactNode; className?: string; children?: React.ReactNode; }) => ( @@ -44,7 +44,15 @@ export const Input = ({ labelClassName, }: InputProps) => { return ( - + + {label} + {value.length} chars + + } + className={labelClassName} + > ({ const textareaRef = useAutosizeTextareaHeight({ value }); return ( - + + {label} + {value.length} chars + + } + className={wrapperClassName} + >