I need assistance with returning JSX to the title prop of a material-ui card component. My goal is to have two boxes displayed with space between them, one on the left side and one on the right side of the header.
Using flex box, I am able to display the divs inline as expected, but I am having trouble moving them across the horizontal axis. Below is a screenshot showing what it looks like currently: screenshot
renderCardTitle() {
return (
<div style={{ display: 'inline-flex', justifyContent: 'space-between' }}>
<div>
first box
</div>
<div style={{ alignSelf: 'flex-end' }}>
second box
</div>
</div>
);
}
The code for the card component in question is as follows:
<Card style={styles.cardStyles}>
<CardHeader
title={this.renderCardTitle()}
actAsExpander
showExpandableButton
/>
<CardText expandable>
Details about the quiz
</CardText>
</Card>
Any help or suggestions would be greatly appreciated!