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

About source code of icon component #80

Open
tc9011 opened this issue May 29, 2019 · 0 comments
Open

About source code of icon component #80

tc9011 opened this issue May 29, 2019 · 0 comments

Comments

@tc9011
Copy link

tc9011 commented May 29, 2019

Hi, myxvisual

I read the source code of this project recently. And I have a question about icon component, what the difference between text and span to render icon ?

<PseudoClasses
        {...attributes}
        onMouseEnter={this.handleMouseEnter}
        onMouseLeave={this.handleMouseLeave}
        {...styleClasses}
      >
        {useSVGElement ? (
          <text>{icon}</text>
        ) : (
          <span>{icon}</span>
        )}
</PseudoClasses>
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

1 participant