dcx-react-library icon indicating copy to clipboard operation
dcx-react-library copied to clipboard

fix: removing unnecessary div from error message

Open Ibabalola opened this issue 10 months ago • 1 comments

When rendering the form input I noticed the empty error div was still rendered on page load

<div class="dcx-form-input govuk-form-group">
   <label for="userReference">some label</label>
   <div class="dcx-error-message"></div> <!-- this container div is not required -->
   <div class="dcx-hint govuk-hint">some hint</div>
   <input name="userReference" type="text" class="govuk-input" tabindex="0" id="userReference" value="">
</div>

Screenshot 2024-04-19 at 13 53 38

This PR remove this such that the error div containing the error message is rendered only when needed

Ibabalola avatar Apr 19 '24 13:04 Ibabalola

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (9f532f2) to head (5abe53a).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@               Coverage Diff               @@
##           release/1.0.0      #636   +/-   ##
===============================================
  Coverage         100.00%   100.00%           
===============================================
  Files                 85        85           
  Lines               1549      1554    +5     
  Branches             544       547    +3     
===============================================
+ Hits                1549      1554    +5     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 19 '24 13:04 codecov-commenter