You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiCard] card's children is an escape hatch but description is still required #4546
In the event that you need more than just paragraph text for the description, you can pass anything you need as the children of the component.
but even in that case, description is always required. There's an additional complication where, if you want the card's description to be a single block-level element, the entire content must be passed as children and nothing provided to description, as everything in description is wrapped in EuiText>p, and React console.warn's about invalid DOM nesting.
description's type definition includes boolean - mostly by accident - so passing description={false} effectively skirts the issue but the EuiText>p is still rendered with empty content. We should add a quick conditional around that rendering to better support this use case.
This is something that I have fought with for a long time. This first sentence in the docs has been up there since the creation of EuiCard and was to set the tone for what a card is:
At its core an EuiCard should contain a title,description, and an icon.
And in a similar vein, the sentence that you copied says:
In the event that you need more than just paragraph text for the description,
Means, that a description (rendering as paragraph text) is still required.
But I guess I give up and we'll just need to mark description as optional.
Activity
cchaos commentedon Feb 18, 2021
This is something that I have fought with for a long time. This first sentence in the docs has been up there since the creation of EuiCard and was to set the tone for what a card is:
And in a similar vein, the sentence that you copied says:
Means, that a description (rendering as paragraph text) is still required.
But I guess I give up and we'll just need to mark
descriptionas optional.patelaryan7751 commentedon Feb 20, 2021
can i work on this issue? @chandlerprall
chandlerprall commentedon Feb 22, 2021
@patelaryan7751 go ahead; any issue not assigned + doesn't have a comment with someone actively working on it is free to take on!
hetanthakkar commentedon Feb 25, 2021
@patelaryan7751 you still working on this issue?
patelaryan7751 commentedon Feb 25, 2021
i am busy with acads yaa you can work
Updated CHANGELOG.md for issue elastic#4546
hetanthakkar commentedon Feb 25, 2021
@chandlerprall I have submitted a PR for this issue. Could you please review it!
hetanthakkar commentedon Mar 1, 2021
@myasonik I've made the required changes could you please check
cchaos commentedon Mar 16, 2021
Closed by #4582