The error occurs when in the Stat component in the description you add something other than plain text, for example I include my own component, doing this generates a <div> tag inside a <p>, for example:
This produces a problem with React validation, to be more exact it shows this warning in console:
Warning: validateDOMnesting (...): <div> cannot appear as a descendant of <p>.
Modifying the <p> tags by <span> fixes this error and so you can use custom components, even other Eui components within stats.
Originally posted by @victorst79 in #3673 (comment)
The error occurs when in the Stat component in the description you add something other than plain text, for example I include my own component, doing this generates a
<div>tag inside a<p>, for example:This produces a problem with React validation, to be more exact it shows this warning in console:
Warning: validateDOMnesting (...): <div> cannot appear as a descendant of <p>.Modifying the
<p>tags by<span>fixes this error and so you can use custom components, even other Eui components within stats.Originally posted by @victorst79 in #3673 (comment)