Skip to content

Commit 2182d63

Browse files
(FormElement): rename htmlFor with controlId
1 parent b11ae01 commit 2182d63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scripts/FormElement.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { TooltipContent } from './TooltipContent';
1818
export type FormElementProps = {
1919
id?: string;
2020
className?: string;
21-
htmlFor?: string;
21+
controlId?: string;
2222
label?: string;
2323
required?: boolean;
2424
error?: boolean | string | { message: string };
@@ -44,7 +44,7 @@ export const FormElement = createFC<
4444
const {
4545
id,
4646
className,
47-
htmlFor,
47+
controlId,
4848
cols = 1,
4949
elementRef,
5050
label,
@@ -100,7 +100,7 @@ export const FormElement = createFC<
100100
<LabelTag
101101
id={id}
102102
className='slds-form-element__label'
103-
{...(LabelTag === 'label' ? { htmlFor } : {})}
103+
{...(LabelTag === 'label' ? { htmlFor: controlId } : {})}
104104
onClick={id ? undefined : onClickLabel}
105105
>
106106
{required ? (

0 commit comments

Comments
 (0)