iconfu/svg-inject

Partly img effective

Gamehu opened this issue · 0 comments

hi,guys,

i got some problem,please help me.

.tree-node-icon {
	width: $imgSize;
	margin-right: $imgMarginR;
}
.svg-color{
      g[transform] {
         fill: red;
      }
}

const iconClassName='tree-node-icon  svg-color'
	<img
			className={iconClassName}
			src={iconType}
			onError={noFind}
			onLoad={(event) => {
				SVGInject(event.target)
			}}
		/>

result:
image