0

私は持っている

render() {
    return <AppBar style={{ position: "fixed" }} title={<span>my Title</span>}

        iconElementLeft={<IconButton><NavigationMenu /></IconButton>}
        iconStyleRight={{color:"red"}}
        iconElementRight={<IconButton><span className = "material-icons">account_circle</span></IconButton>}
        />
}

しかしiconStyleRightは私にエラーを与えています

Type '{ [x: number]: undefined; color: any; }' is not assignable to type 'string'

理由はわかりません。無視される要素にastyleを追加するなど、多くの組み合わせを試しました。<span>

アイコンにスタイルを適用する方法を理解できるように、この正しいアイコンを赤で表示するための正しい構文をいただければ幸いです。

4

1 に答える 1