EuiStat change tags to use components inside.#3673
EuiStat change tags to use components inside.#3673victorst79 wants to merge 1 commit intoelastic:masterfrom
Conversation
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
|
💚 CLA has been signed |
|
Welcome @victorst79! Can you also explain further the error you would receive? |
|
Hi @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 This produces a problem with React validation, to be more exact it shows this warning in console:
Modifying the In reference to the CLA signature, I have signed it, I have downloaded the copy but it still marks the bot with a cross, is there any step that I have not done correctly? Regards! |
|
Sorry about the CLA comment, yes it is showing as complete. Github may not have refreshed. That's all good! Regarding the error, I thought that might be the case. EuiStat is pretty prescriptive with the elements it renders because they're being wrapped in EuiTitle and EuiText components which should be some level of text element (heading, paragraph, etc). EuiStat does accept If not, we will need to support some level of customizing these elements instead of just replacing the |
|
Hi @cchaos 👋 To put you in context, my problem is that within EuiStat I have a custom component that contains several text strings that allow me to filter directly with this information. It is a brief summary because it is a little complex to explain, my apologies. In another order of things, I am not really good with unit tests, if you value my idea as positive and finally add it I would value it a lot. Have a nice day! |
|
We definitely value your idea @victorgs ! We'll just need to be sure we can be even more customizable with what element renders without possibly breaking any current implementations. What I'll do is create an issue for this, but close the current PR. Hopefully one of us or another community member can pick up the issue relatively soon for you. |
Summary
Hi guys!
With this PR a modification is made to the EuiStat component. When rendering title and description it was done as a "p" tag this caused an error if you work with any component within it.
With these changes you can already include Eui components or custom components within Stat.
Checklist