react-uwp icon indicating copy to clipboard operation
react-uwp copied to clipboard

About source code of icon component

Open tc9011 opened this issue 6 years ago • 0 comments

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>

tc9011 avatar May 29 '19 03:05 tc9011