Skip to content
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

Card: can title not be wrapped with h3? #3388

Closed
xiaofan2406 opened this issue Oct 12, 2016 · 4 comments
Closed

Card: can title not be wrapped with h3? #3388

xiaofan2406 opened this issue Oct 12, 2016 · 4 comments

Comments

@xiaofan2406
Copy link
Contributor

versions

2.0.1

For Card component, title accepts an React.Element, but it is wrapped with an h3 regardless. It can cause many styling issues.

In my own case, I got an warning warning.js:36 Warning: validateDOMNesting(...): <h3> cannot appear as a child of <h3>., because my title element contains an h3 element.

Is it possible to change the logic so that it is wrapped with h3 if title is a string, and with div if title is an element?

@afc163
Copy link
Member

afc163 commented Oct 12, 2016

👌 Give us a PR~

@afc163
Copy link
Member

afc163 commented Oct 13, 2016

@xiaofan2406 ping~

@xiaofan2406
Copy link
Contributor Author

@afc163 sure. will work on it.

@lock
Copy link

lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants