Skip to content

Commit

Permalink
Addon Info: Omit empty inline info header
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanbeevers committed Jun 17, 2017
1 parent 1f98ae9 commit b62b685
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions addons/info/src/components/Story.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,18 @@ export default class Story extends React.Component {
}

_renderInline() {
const infoHeader = this._getInfoHeader();

return (
<div>
<div style={this.state.stylesheet.infoPage}>
<div style={this.state.stylesheet.infoBody}>
{this._getInfoHeader()}
</div>
</div>
{
infoHeader &&
<div style={this.state.stylesheet.infoPage}>
<div style={this.state.stylesheet.infoBody}>
{infoHeader}
</div>
</div>
}
<div>
{this._renderStory()}
</div>
Expand Down

0 comments on commit b62b685

Please sign in to comment.