Skip to content

Commit b059104

Browse files
feat: Allow ReactNode as label prop in TextField component
Update TextField component's label prop type from string to string | React.ReactNode to support both simple text labels and complex ReactNode labels while maintaining full backward compatibility. Requested by: Mohsen Ghaemmaghami
1 parent 23ca528 commit b059104

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/components/src/ui/text-field.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const FieldSuffix = ({
5454
export interface TextInputProps extends Omit<InputProps, 'prefix' | 'suffix'> {
5555
control?: Control<FieldValues>;
5656
name: FieldPath<FieldValues>;
57-
label?: string;
57+
label?: string | React.ReactNode;
5858
description?: string;
5959
components?: Partial<FieldComponents> & {
6060
Input?: React.ComponentType<InputProps & React.RefAttributes<HTMLInputElement>>;

0 commit comments

Comments
 (0)