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({
183183 } }
184184 onClick = { onTabClick && ( ( ) => onTabClick ( title ) ) }
185185 >
186- < div > { title } </ div >
186+ < TabTitle title = { title } / >
187187 </ div >
188188 ) ) }
189189 < div style = { { flex : 1 } } />
@@ -192,6 +192,23 @@ function TabsContainer({
192192 )
193193}
194194
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+
195212type TabsSnapshot = Record <
196213 string ,
197214 { left : number ; active : boolean ; width : number }
You can’t perform that action at this time.
0 commit comments