conditional dialog rendering

This commit is contained in:
muerwre 2019-03-29 10:26:26 +07:00
parent 41f40a783f
commit a4b620471a

View file

@ -73,26 +73,31 @@ export class Component extends React.PureComponent<ITitleDialogProps, ITitleDial
onMouseOver={this.onHover} onMouseOver={this.onHover}
onMouseOut={this.onLeave} onMouseOut={this.onLeave}
> >
<div {
className="title-dialog-pane title-dialog-name" title &&
ref={el => { this.ref_title = el; }} <div
> className="title-dialog-pane title-dialog-name"
<h2>{title}</h2> ref={el => { this.ref_title = el; }}
</div> >
<div <h2>{title}</h2>
className="title-dialog-pane title-dialog-text" </div>
style={{ }
height: (raised ? height_raised : height), {
display: height === 0 ? 'none' : 'block'
}}
ref={el => { this.ref_overflow = el; }}
>
<div <div
ref={el => { this.ref_text = el; }} className="title-dialog-pane title-dialog-text"
style={{
height: (raised ? height_raised : height),
display: height === 0 ? 'none' : 'block'
}}
ref={el => { this.ref_overflow = el; }}
> >
<div
ref={el => { this.ref_text = el; }}
>
</div>
</div> </div>
</div> }
</div> </div>
</div> </div>
</div> </div>