Repository navigation
fix(ui): merge caller className in PasswordInput via cn - #212
Merged
gkhngyk merged 1 commit intoJun 9, 2026
Merged
Conversation
- className="pr-10" placed after {...props} was silently dropping any
className passed by callers since spread props were overridden
- destructure className from props and merge with cn('pr-10', className)
- pr-10 is always applied as the base; caller className is appended
- no behavior change for the four existing auth form callers (none pass className)
Fixes ansvisor#211
Follow-up to ansvisor#210
3 tasks
Contributor
|
Merged — exactly the fix: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug in the
PasswordInputcomponent where aclassNamepassed by a caller was silently dropped instead of being merged.Fixes #211
Follow-up to #210
Root cause
className="pr-10"was placed after{...props}on theInputelement, so anyclassNamein props was overridden. No current caller passes aclassNameso there is no visible bug today, but as a reusableui/component the first caller that needs an error style oraria-invalidclass would silently lose it.Change
classNameout of props in the function signaturecn('pr-10', className)sopr-10is always applied as the base and the caller's class is appendedclassNamebefore{...props}so the spread cannot override itAcceptance criteria
classNamepassed toPasswordInputis merged withpr-10(both applied), not droppedclassName)