1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00

Fix contentText PropType of InfoTooltip (#9652)

The `InfoTooltip` component had a `contentText` prop with a PropType of
`string` that was being passed a `node` as of #9614. This resulted in a
PropType error.

The `contentText` prop was being passed directly to `Tooltip` component
as the prop `html`, which has a PropType of `node`. A string is a valid
`node` type, which is why this worked before.

The `contentText` prop is now of type `node`, and the error no longer
appears.
This commit is contained in:
Mark Stacey 2020-10-20 10:36:57 -02:30 committed by GitHub
parent 7f1bbbc9a3
commit 4197ff7295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ export default function InfoTooltip ({
} }
InfoTooltip.propTypes = { InfoTooltip.propTypes = {
contentText: PropTypes.string, contentText: PropTypes.node,
position: PropTypes.oneOf(['top', 'left', 'bottom', 'right']), position: PropTypes.oneOf(['top', 'left', 'bottom', 'right']),
wide: PropTypes.bool, wide: PropTypes.bool,
containerClassName: PropTypes.string, containerClassName: PropTypes.string,