I want to use an Outlined style of a TextField who's label must contain a tooltip icon with some text
Please refer to Sandbox for a live demo
Code excerpt:
const IconWithTooltip = () => (
<Tooltip title="Text explaining stuff">
<HelpIcon />
</Tooltip>
);
const Example = () => {
return (
<div>
<FormControl variant="outlined">
<InputLabel htmlFor="with-label">
FormControl with label
<IconWithTooltip />
</InputLabel>
<OutlinedInput
id="with-label"
startAdornment={<InputAdornment position="start">$</InputAdornment>}
/>
</FormControl>
<TextField
label={
<div>
TextFiled
<IconWithTooltip />
</div>
}
variant="outlined"
/>
Just icon with tooltop
<IconWithTooltip />
</div>
);
};
Problem: When hovering over the (?) icon tooltip does not appear. I have tried coding the input in 2 different ways using FormControl and TextInput but none works. Am i missing something?