First, Sprite

  1. The UI designer provides the SVG collection file as follows :(each is an icon)

  1. Use:

import iconSet from '.. /.. /assets/svgIconSet/symbol-defs.svg'; <svg width='40px' height='40px'> <use xlinkHref={iconSet + item.icon}></use> </svg>

Normal SVG

Normal SVG can be introduced as normal images

If you want to change the color of the line to switch the button state, you can change the style of the class according to the condition