@@ -36,36 +36,33 @@ class ProjectsSideNav extends React.Component<Props & ReduxProps, {}> {
3636 const projects = config . projects
3737 return (
3838 < SideNav >
39- < DraggableHeader isElectron = { isElectron } />
40- < List >
41- < div >
42- < TitleRow >
43- < Title > { folderName } </ Title >
44- < SettingsIcon
45- width = { 18 }
46- height = { 18 }
47- onClick = { this . props . openConfigTab }
48- title = "Project settings"
49- />
50- </ TitleRow >
51- { endpoints && this . renderEndpoints ( endpoints ) }
52- { projects &&
53- Object . keys ( projects ) . map ( projectName => {
54- const project = projects [ projectName ]
55- const projectEndpoints =
56- project . extensions && project . extensions . endpoints
57- if ( ! projectEndpoints ) {
58- return null
59- }
60-
61- return (
62- < Project key = { projectName } >
63- < ProjectName > { projectName } </ ProjectName >
64- { this . renderEndpoints ( projectEndpoints , projectName ) }
65- </ Project >
66- )
67- } ) }
68- </ div >
39+ < List isElectron = { isElectron } >
40+ < TitleRow >
41+ < Title > { folderName } </ Title >
42+ < SettingsIcon
43+ width = { 18 }
44+ height = { 18 }
45+ onClick = { this . props . openConfigTab }
46+ title = "Project settings"
47+ />
48+ </ TitleRow >
49+ { endpoints && this . renderEndpoints ( endpoints ) }
50+ { projects &&
51+ Object . keys ( projects ) . map ( projectName => {
52+ const project = projects [ projectName ]
53+ const projectEndpoints =
54+ project . extensions && project . extensions . endpoints
55+ if ( ! projectEndpoints ) {
56+ return null
57+ }
58+
59+ return (
60+ < Project key = { projectName } >
61+ < ProjectName > { projectName } </ ProjectName >
62+ { this . renderEndpoints ( projectEndpoints , projectName ) }
63+ </ Project >
64+ )
65+ } ) }
6966 </ List >
7067 { isElectron && (
7168 < Footer >
@@ -118,81 +115,74 @@ export default connect(
118115 { openConfigTab } ,
119116) ( ProjectsSideNav )
120117
121- const Project = styled . div `
122- margin-bottom: 12px;
123- `
124-
125118const SideNav = styled . div `
126- position: relative;
119+ display: flex;
120+ flex-direction: column;
121+ justify-content: space-between;
127122 background: ${ p => p . theme . editorColours . sidebar } ;
128- flex: 0 222px;
123+ flex-basis: 222px;
129124 color: ${ p => p . theme . editorColours . text } ;
130125 border-right: 6px solid ${ p => p . theme . editorColours . background } ;
131126`
132127
133- const DraggableHeader = styled . div `
134- padding-top: ${ ( p : any ) => ( p . isElectron ? 48 : 20 ) } px;
135- background: ${ p => p . theme . editorColours . sidebarTop } ;
136- -webkit-app-region: drag;
137- max-width: 222px;
138- overflow: hidden;
139- ` as any
140-
141128const List = styled . div `
142- padding-bottom: 32px;
143- max-width: 222px;
144- overflow: hidden;
129+ -webkit-app-region: drag;
130+ padding-top: ${ ( p : any ) => ( p . isElectron ? 48 : 20 ) } px;
131+ display: flex;
132+ flex-direction: column;
145133 background: ${ p => p . theme . editorColours . sidebarTop } ;
146134`
147135
148136const Title = styled . div `
149137 font-size: 16px;
150138 font-weight: 600;
151139 color: ${ p => p . theme . editorColours . text } ;
140+ word-break: break-word;
152141`
153142
154143const TitleRow = styled . div `
155144 display: flex;
156145 align-items: center;
157- padding-left: 20px;
158- padding-right: 10px;
159- padding-bottom: 20px;
160- justify-content: space-between;
161-
146+ justify-content: space-evenly;
147+ margin: 0 15px 20px 15px;
162148 svg {
149+ min-width: 18px;
150+ min-height: 18px;
163151 cursor: pointer;
164- }
165-
166- svg {
167152 fill: ${ p => p . theme . editorColours . icon } ;
168153 transition: 0.1s linear fill;
169154 }
170-
171155 &:hover {
172156 svg {
173157 fill: ${ p => p . theme . editorColours . iconHover } ;
174158 }
175159 }
176160`
177161
162+ const Project = styled . div `
163+ display: flex;
164+ flex-direction: column;
165+ & + & {
166+ margin-top: 12px;
167+ }
168+ &:last-child {
169+ margin-bottom: 32px;
170+ }
171+ `
172+
178173const ProjectName = styled . div `
179174 font-size: 14px;
180175 color: ${ p => p . theme . editorColours . text } ;
181176 font-weight: 600;
182177 letter-spacing: 0.53px;
183- margin-left: 30px;
184- margin-bottom: 6px ;
178+ margin: 0 10px 6px 30px;
179+ word-break: break-word ;
185180`
186181
187182const Footer = styled . div `
188- position: absolute;
189- bottom: 0;
190- width: 100%;
191- box-sizing: border-box;
192183 display: flex;
193- align-items: center;
194- justify-content: space-between;
195- padding: 20px;
184+ justify-content: center;
185+ margin: 32px 0;
196186 background: ${ p => p . theme . editorColours . sidebarBottom } ;
197187`
198188
@@ -215,6 +205,8 @@ const WorkspaceButton = styled.button`
215205 margin-right: 6px;
216206 }
217207 svg {
208+ min-width: 18px;
209+ min-height: 18px;
218210 stroke: ${ p => p . theme . editorColours . buttonWorkspaceText } ;
219211 }
220212`
0 commit comments