brand icon indicating copy to clipboard operation
brand copied to clipboard

🐛 [BUG - React] - FormControl.Validation layout problems with Checkbox

Open rezrah opened this issue 2 years ago • 1 comments

The following snippet:

<FormControl validationStatus='error'>
  <FormControl.Label>Day</FormControl.Label>
  <Checkbox name="day" value="" />
  <FormControl.Validation className="test">Please select at least one day</FormControl.Validation>
</FormControl>

Produces this:

validation message appearing before checkbox on the same line

This happens because of row-reverse flex layout method.

Expected behavior

  • Validation appears below the input and label per the usual validation layout: https://primer.style/brand/components/FormControl#validation

rezrah avatar Mar 09 '23 11:03 rezrah

image

I had a quick stab at this in #513

MadMango avatar Dec 11 '23 19:12 MadMango

Closing this out since it should be fixed by the changes in https://github.com/primer/brand/pull/728

MelissaPastore avatar Nov 01 '24 16:11 MelissaPastore