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

In React, can't set className for iconpark-icon, only set the class attribute #293

Closed
Zero-Rock opened this issue Jul 22, 2021 · 2 comments

Comments

@Zero-Rock
Copy link

when i use className for className, like this
image

className will be parsed classname

image

@loveDstyle
Copy link
Collaborator

loveDstyle commented Jul 22, 2021

Yes, it's a confusing thing.😅 To use CSS class on a web component (a custom element to be specific) in React, you should use class instead of className.

This is mentioned in React doc: https://reactjs.org/docs/web-components.html#using-web-components-in-react
image

There's also an issue related to this topic.

@Zero-Rock
Copy link
Author

I see, this is internal implementation of React. but this usage is still confusing, thank you anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants