'Return function in label field

I have the field like this:

<Field
label={d('abc.xyz')}
inputType="checkbox"
/>
{icon()}

I only mention the important things here. 'd' is just the props i use to access to take the label name and {icon()} is function called. the thing i want to do is , can the label return the d('abc.xyx') + {icon()}

In basic, the field only hay label name like normally. Now i want it have the 'Icon' to show tooltip. i have tried label={d('abc.xyz') + {icon()}} but it returns [object Object] in the {icon()} function.

Thing i want to do look like: Click the button 'icon' mean while d('abc.xyz') return ''Click the button''. {icon()} return ''icon''

I hope i can get help here. I am really grateful to you guys. Thank you so much!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source