Reputation: 110960
I have the following:
<MenuItem
primaryText={currentUserProfile.displayName || currentUserProfile.email}
onTouchTap={this.handleTouchTap}
leftIcon={<DropDownArrow color={textColor}/>}
rightIcon={<img src="{currentUserProfile.displayName}" alt="Me" />}
style={{color: textColor}}
/>
The rightIcon is not working as it is already within a {} --- how do I get a variable to work within a {}?
Upvotes: 0
Views: 39
Reputation: 699
You are specifying your URL as "{currentUserProfile.displayName}"
as a string literal. You should be using rightIcon={<img src={currentUserProfile.displayName} alt="Me" />}
EDIT: Notice your quotation marks.
Upvotes: 2