Skip to content

[EuiStat] Allow customizing the render of the title and description HTML tags #3676

@cchaos

Description

@cchaos

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:

<p><div></div></p>

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions