File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ function TabsContainer({
183
183
} }
184
184
onClick = { onTabClick && ( ( ) => onTabClick ( title ) ) }
185
185
>
186
- < div > { title } </ div >
186
+ < TabTitle title = { title } / >
187
187
</ div >
188
188
) ) }
189
189
< div style = { { flex : 1 } } />
@@ -192,6 +192,23 @@ function TabsContainer({
192
192
)
193
193
}
194
194
195
+ function TabTitle ( { title } : { title : string } ) {
196
+ if ( ! title ) {
197
+ return < div />
198
+ }
199
+
200
+ const separatorIndex = title . lastIndexOf ( "/" ) + 1
201
+ const filename = title . substring ( separatorIndex )
202
+ const folder = title . substring ( 0 , separatorIndex )
203
+
204
+ return (
205
+ < div >
206
+ < span style = { { opacity : 0.5 } } > { folder } </ span >
207
+ { filename }
208
+ </ div >
209
+ )
210
+ }
211
+
195
212
type TabsSnapshot = Record <
196
213
string ,
197
214
{ left : number ; active : boolean ; width : number }
You can’t perform that action at this time.
0 commit comments