0
6つのボタンが割り当てられています。それぞれのボタンに背景を付けたいと思います。リアクションボタンに背景画像が設定されていません
button(x) {
console.log(x.image) # Gives correct URL for image for button
var modalButton = {
backgroundImage: x.image
}
return (
<Button style={modalButton}>Clickity Click</Button>
)
}
render() {
<div>
{_(this.state.data).map((x) => this.button(x))}
</div>
}
ただし、これは機能しません。私が知っていることから、ダッシュのないbackgroundImage
はインラインCSSの正しい構文です。
完全に逃しました。ありがとう! – patrickhuang94
確かに、正解とマークできますか? – Kafo