From a4b620471a8c625c602a7f8f48aa7ed9203c8a6b Mon Sep 17 00:00:00 2001 From: muerwre Date: Fri, 29 Mar 2019 10:26:26 +0700 Subject: [PATCH] conditional dialog rendering --- src/components/dialogs/TitleDialog.tsx | 37 +++++++++++++++----------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/src/components/dialogs/TitleDialog.tsx b/src/components/dialogs/TitleDialog.tsx index d8d8949..018d211 100644 --- a/src/components/dialogs/TitleDialog.tsx +++ b/src/components/dialogs/TitleDialog.tsx @@ -73,26 +73,31 @@ export class Component extends React.PureComponent -
{ this.ref_title = el; }} - > -

{title}

-
-
{ this.ref_overflow = el; }} - > + { + title && +
{ this.ref_title = el; }} + > +

{title}

+
+ } + {
{ 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; }} > +
{ this.ref_text = el; }} + > +
-
+ }