pm-idm
pm-idm copied to clipboard
Improve and simplify strength handling in text input
Description
There's logic around the strength indicator on text input that can be improved and simplified.
This task was created after this comment.
Acceptance Criteria
- [ ] Remove any level compute logic from
<TextInput>and move to<StrengthIndicator> - [ ] Remove
levelNameandnumberOfLevelsprops from<StrengthIndicator> - [ ] Create a
strength-colors.jsand implementgetColorForStrength, to be used by both components - [ ] Remove
onColorChangefrom<StrengthIndicator>as it's no longer necessary - [ ] Remove strength level css colors (
weak,poor, etc) and usestyleinstead - [ ] Check if making
<StrengthIndicator>a functional component with hooks would further simplify it