-1

convert svg to react component using svg-react library

in cli use command:

npx @svgr/cli --out-dir src/assets/icons/components --typescript  --icon --memo --ref --jsx-runtime automatic --replace-attr-values fill=#000=currentColor -- src/assets/icons/svg
 <g clipPath={'url(#arrow-back-outline_svg__a)'}>
      <path
        d={
          'M19 11H7.14l3.63-4.36a1.001 1.001 0 0 0-1.54-1.28l-5 6a1 1 0 0 0-.09.15c0 .05 0 .08-.07.13A1 1 0 0 0 4 12a1 1 0 0 0 .07.36c0 .05 0 .08.07.13q.039.078.09.15l5 6A1 1 0 0 0 10 19a1 1 0 0 0 .77-1.64L7.14 13H19a1 1 0 0 0 0-2'
        }
        fill="#000"// i expect replace #000 to currentColor,but not result
      />
    </g>

0

Browse other questions tagged or ask your own question.