Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrpospiech committed Feb 22, 2024
1 parent f96ddfa commit c3f1cf5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/uniforms/__tests__/connectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ describe('connectField', () => {
) => {
return props.children ? (
<>
{props.label ? <span data-testid="label">{props.label}</span> : null}
{props.label ? (
<label htmlFor={props.id as string} data-testid="label">
{props.label}
</label>
) : null}
<input
data-testid="field"
{...filterDOMProps(omit(props, 'children', 'label'))}
Expand All @@ -60,7 +64,11 @@ describe('connectField', () => {
</>
) : (
<>
{props.label ? <span>{props.label}</span> : null}
{props.label ? (
<label htmlFor={props.id as string} data-testid="label">
{props.label}
</label>
) : null}
<input
data-testid="field"
{...filterDOMProps(omit(props, 'label'))}
Expand Down

0 comments on commit c3f1cf5

Please sign in to comment.