-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EuiCard] card's children is an escape hatch but description is still required #4546
Comments
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 |
can i work on this issue? @chandlerprall |
@patelaryan7751 go ahead; any issue not assigned + doesn't have a comment with someone actively working on it is free to take on! |
@patelaryan7751 you still working on this issue? |
i am busy with acads yaa you can work |
@chandlerprall I have submitted a PR for this issue. Could you please review it! |
@myasonik I've made the required changes could you please check |
Closed by #4582 |
EuiCard's Custom children example states
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 aschildren
and nothing provided todescription
, as everything indescription
is wrapped inEuiText>p
, and React console.warn's about invalid DOM nesting.description
's type definition includesboolean
- mostly by accident - so passingdescription={false}
effectively skirts the issue but theEuiText>p
is still rendered with empty content. We should add a quick conditional around that rendering to better support this use case.The text was updated successfully, but these errors were encountered: