hide registration subtitle and fix enableShowHide in SessionInput

pull/691/head
Audric Ackermann 6 years ago
parent e17e93ef84
commit e3360b1978

@ -22,9 +22,7 @@ export class SessionInput extends React.PureComponent<Props, State> {
super(props); super(props);
this.updateInputValue = this.updateInputValue.bind(this); this.updateInputValue = this.updateInputValue.bind(this);
this.renderEnableShowHideButton = this.renderEnableShowHideButton.bind( this.renderShowHideButton = this.renderShowHideButton.bind(this);
this
);
this.state = { this.state = {
inputValue: '', inputValue: '',
@ -63,30 +61,26 @@ export class SessionInput extends React.PureComponent<Props, State> {
)} )}
/> />
{this.renderEnableShowHideButton(enableShowHide)} {enableShowHide && this.renderShowHideButton()}
<hr /> <hr />
</div> </div>
); );
} }
private renderEnableShowHideButton(enableShowHide: boolean | undefined) { private renderShowHideButton() {
if (enableShowHide) { return (
return ( <SessionIconButton
<SessionIconButton iconType={SessionIconType.Eye}
iconType={SessionIconType.Eye} iconSize={SessionIconSize.Medium}
iconSize={SessionIconSize.Medium} iconPadded={false}
iconPadded={false} onClick={() => {
onClick={() => { this.setState({
this.setState({ forceShow: !this.state.forceShow,
forceShow: !this.state.forceShow, });
}); }}
}} />
/> );
);
}
return undefined;
} }
private updateInputValue(e: any) { private updateInputValue(e: any) {

@ -19,7 +19,7 @@ export class SessionRegistrationView extends React.Component<Props> {
<div className="session-content"> <div className="session-content">
<div id="error" className="collapse" /> <div id="error" className="collapse" />
<div className="session-content-accent"> <div className="session-content-accent">
<AccentText showSubtitle={showSubtitle || true} /> <AccentText showSubtitle={showSubtitle} />
</div> </div>
<div className="session-content-registration"> <div className="session-content-registration">
<RegistrationTabs /> <RegistrationTabs />

Loading…
Cancel
Save