Skip to content

Commit

Permalink
Merge pull request #121 from unicef/fix/tooltip-html-link
Browse files Browse the repository at this point in the history
Field tooltip title with link fixed
  • Loading branch information
vinuganesan authored Aug 8, 2022
2 parents 92d9360 + 12147eb commit def859e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unicef/material-ui",
"version": "0.11.0",
"version": "0.11.1",
"description": "UNICEF theme and components of material-ui for react",
"main": "index.js",
"files": [
Expand Down
12 changes: 11 additions & 1 deletion src/components/Shared/InputLabelHelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ const useStyles = makeStyles(theme => ({
linkHelpLabel: {
paddingLeft: theme.spacing(0.5),
},
tooltipPopper: {
'& a': {
color: theme.palette.common.white,
},
},
}))

export default function InputLabelHelp({
Expand All @@ -38,7 +43,12 @@ export default function InputLabelHelp({
<Fragment>
<span>{inputLabel}</span>
{type === 'tooltip' ? (
<Tooltip title={tooltipTitle} placement={tooltipPlacement}>
<Tooltip
interactive
title={<div dangerouslySetInnerHTML={{ __html: tooltipTitle }} />}
placement={tooltipPlacement}
classes={{ popper: classes.tooltipPopper }}
>
<span className={classes.root}>
{icon ? icon : <HelpIcon />}
{label ? (
Expand Down

0 comments on commit def859e

Please sign in to comment.