-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input/refactor #278
Input/refactor #278
Conversation
Reviewer's Guide by SourceryThis pull request focuses on refactoring input components and improving consistency across the codebase. The main changes include adding a 'size' prop to various input components, adjusting styling for different input sizes, and making minor code formatting improvements. File-Level Changes
Tips
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tulsiojha - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
@@ -53,8 +54,9 @@ export const NameIdView = forwardRef<HTMLInputElement, INameIdView>( | |||
isUpdate, | |||
handleChange, | |||
nameErrorLabel, | |||
size = 'lg', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Consider using a constant for the default size value
Using a constant (e.g., DEFAULT_INPUT_SIZE = 'lg') for the default size would make it easier to maintain and update this value across the application in the future.
size = 'lg', | |
const DEFAULT_INPUT_SIZE = 'lg'; | |
// ... other code ... | |
size = DEFAULT_INPUT_SIZE, |
Summary by Sourcery
Refactor input components to include a 'size' prop for flexible sizing, standardize input field sizes, and enhance code readability with trailing commas.
Enhancements: