0

我发现gr图像不能改变颜色,你知道如何解决这个问题吗?谢谢你。

import React from "react";
import "./styles.css";
import { GrAssistListening } from "react-icons/gr";

export default function App() {
  return (
    <div>
      <GrAssistListening color="red" size="xlarge" />
    </div>
  );
}

4

2 回答 2

-1

尝试使用此方法

  import React from "react";
  import "./styles.css";
  import { GrAssistListening } from "react-icons/gr";

  export default function App() {
    return (
      <div>
        <GrAssistListening style={{color: red, font-size: 30px}} />
      </div>
    );
  }
于 2021-06-27T02:37:40.363 回答
-2

进入

node_modules\react-icons\gr\index.esm.js

搜索

助听

GrassisListening 的初始代码

export function GrAssistListening (props) { return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24"},"child":[{"tag":"path","attr":{"fill":"none","stroke":"#000","strokeLinecap":"round","strokeLinejoin":"round","strokeWidth":"2","d":"M11,21 C11.7572165,21.6666667 12.4238831,22 13,22 C15,22 16,21 16,19 C16,17.6666667 16.6666667,16.3333333 18,15 C19.2667508,13.7332492 20,11.9329966 20,10 C20,6.13400675 16.8659932,3 13,3 C9.13400675,3 6,6.13400675 6,10 M17,10 C17,7.790861 15.209139,6 13,6 C10.790861,6 9,7.790861 9,10 M3,20 L8,14 L9,18 L14,12"}}]})(props);

};

现在更改或删除笔画值,然后重新启动启动服务器生效。

于 2021-09-26T15:30:21.737 回答