Skip to content

Commit

Permalink
feat(TextInput): change type prop label
Browse files Browse the repository at this point in the history
  • Loading branch information
u4aew committed Dec 17, 2024
1 parent 19ca365 commit 9f0bd7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/controls/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export type TextInputProps = BaseInputControlProps<HTMLInputElement> & {
/** The control's html attributes */
controlProps?: React.InputHTMLAttributes<HTMLInputElement>;
/** Help text rendered to the left of the input node */
label?: string;
label?: React.ReactNode;
/** User`s node rendered before label and input node
* @deprecated use `startContent` instead
*/
Expand Down Expand Up @@ -238,10 +238,10 @@ export const TextInput = React.forwardRef<HTMLSpanElement, TextInputProps>(
maxWidth: `calc(50% - ${startContentSize.width}px)`,
}}
className={b('label')}
title={label}
title={typeof label === 'string' ? label : undefined}
htmlFor={id}
>
{`${label}`}
{label}
</label>
)}
<TextInputControl {...props} {...commonProps} controlRef={handleRef} />
Expand Down

0 comments on commit 9f0bd7c

Please sign in to comment.