sforkowany z mirror/soapbox
FormGroup: move hintText above input
rodzic
79a33d0f1d
commit
ddf433a5c9
|
@ -86,6 +86,12 @@ const FormGroup: React.FC<IFormGroup> = (props) => {
|
|||
)}
|
||||
|
||||
<div className='mt-1 dark:text-white'>
|
||||
{hintText && (
|
||||
<p data-testid='form-group-hint' className='mb-0.5 text-xs text-gray-700 dark:text-gray-600'>
|
||||
{hintText}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{firstChild}
|
||||
{inputChildren.filter((_, i) => i !== 0)}
|
||||
|
||||
|
@ -97,12 +103,6 @@ const FormGroup: React.FC<IFormGroup> = (props) => {
|
|||
{errors.join(', ')}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{hintText && (
|
||||
<p data-testid='form-group-hint' className='mt-0.5 text-xs text-gray-700 dark:text-gray-600'>
|
||||
{hintText}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Ładowanie…
Reference in New Issue