From 751a9ef3a12c952fe179f256d854d0c4aa37e28e Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Wed, 4 Oct 2017 22:49:07 +0200 Subject: Apply prettier to codebase --- src/components/app/sidebars/Sidebar.js | 66 ++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 27 deletions(-) (limited to 'src/components/app/sidebars/Sidebar.js') diff --git a/src/components/app/sidebars/Sidebar.js b/src/components/app/sidebars/Sidebar.js index 00e3607a..33dbe011 100644 --- a/src/components/app/sidebars/Sidebar.js +++ b/src/components/app/sidebars/Sidebar.js @@ -3,36 +3,48 @@ import React from "react"; import "./Sidebar.css"; class Sidebar extends React.Component { - state = { - collapsed: false - }; + state = { + collapsed: false + }; - render() { - const collapseButton = ( -
this.setState({collapsed: !this.state.collapsed})} - > - {(this.state.collapsed && this.props.isRight) || (!this.state.collapsed && !this.props.isRight) ? - : - - } -
- ); + render() { + const collapseButton = ( +
this.setState({ collapsed: !this.state.collapsed })} + > + {(this.state.collapsed && this.props.isRight) || + (!this.state.collapsed && !this.props.isRight) ? ( + + ) : ( + + )} +
+ ); - if (this.state.collapsed) { - return collapseButton; - } - return ( -
e.stopPropagation()} - > - {this.props.children} - {collapseButton} -
- ); + if (this.state.collapsed) { + return collapseButton; } + return ( +
e.stopPropagation()} + > + {this.props.children} + {collapseButton} +
+ ); + } } export default Sidebar; -- cgit v1.2.3