fix: simplify input field handling in InputListComponent (#5255)

* 🔧 (index.tsx): Remove unnecessary conditional rendering for addNewInput button and simplify the logic for onClick event handler to improve code readability and maintainability.

* ✨ (button-input-list.tsx): Add a new component ButtonInputList to handle button input list functionality in the frontend
📝 (get-class-name.ts): Create a helper function getButtonClassName to generate button class names based on disabled state
📝 (get-test-id.ts): Create a helper function getTestId to generate unique test ids for input list buttons
🔄 (index.tsx): Refactor InputListComponent to use the new ButtonInputList component for handling button input list functionality in the frontend
This commit is contained in:
Cristhian Zanforlin Lousa 2024-12-13 19:06:47 -03:00 • committed by GitHub
commit 32a0707f9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 111 additions and 87 deletions

View file

@ -896,6 +896,7 @@
},
"node_modules/@clack/prompts/node_modules/is-unicode-supported": {
"version": "1.3.0",
"extraneous": true,
"inBundle": true,
"license": "MIT",
"engines": {