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'
不知道爲什麼。我嘗試了很多組合,包括將style
添加到<span>
元素,這被忽略。
希望能夠使正確的圖標顯示爲紅色的正確語法,以便我能夠理解如何將樣式應用於我的圖標。