File tree Expand file tree Collapse file tree 2 files changed +23
-22
lines changed
src/adapters/codemirror/features Expand file tree Collapse file tree 2 files changed +23
-22
lines changed Original file line number Diff line number Diff line change 1
1
import React , { ReactElement } from 'react' ;
2
2
import { VDomModel , VDomRenderer } from '@jupyterlab/apputils' ;
3
+ import { caretDownIcon , caretUpIcon } from '@jupyterlab/ui-components' ;
3
4
import * as lsProtocol from 'vscode-languageserver-protocol' ;
4
5
import * as CodeMirror from 'codemirror' ;
5
6
import { IEditorPosition } from '../../../positioning' ;
@@ -161,19 +162,18 @@ class Column {
161
162
162
163
function SortableTH ( props : { name : string ; listing : DiagnosticsListing } ) : any {
163
164
const is_sort_key = props . name === props . listing . sort_key ;
165
+ const sortIcon =
166
+ props . listing . sort_direction === 1 ? caretUpIcon : caretDownIcon ;
164
167
return (
165
168
< th
166
169
key = { props . name }
167
170
onClick = { ( ) => props . listing . sort ( props . name ) }
168
- className = {
169
- is_sort_key
170
- ? 'lsp-sorted ' +
171
- ( props . listing . sort_direction === 1 ? 'lsp-descending' : '' )
172
- : ''
173
- }
171
+ className = { is_sort_key ? 'lsp-sorted-header' : null }
174
172
>
175
173
{ props . name }
176
- { is_sort_key ? < span className = { 'lsp-caret' } /> : null }
174
+ { is_sort_key ? (
175
+ < sortIcon . react tag = "span" className = "lsp-sort-icon" />
176
+ ) : null }
177
177
</ th >
178
178
) ;
179
179
}
Original file line number Diff line number Diff line change 57
57
background : var (--jp-layout-color2 );
58
58
}
59
59
60
- .lsp-sort-caret {
61
- height : 16px ;
62
- width : 16px ;
63
- background-size : 18px ;
64
- background-image : 18px ;
65
- background-repeat : no-repeat;
66
- background-position : center;
67
- display : inline-block;
68
- position : relative;
69
- top : 3px ;
60
+ .lsp-sorted-header {
61
+ flex : 0 0 auto;
62
+ display : flex;
63
+ flex-direction : row;
64
+ overflow : hidden;
70
65
}
71
66
72
- .lsp-sorted .lsp-caret {
73
- background-image : var (--jp-icon-caretup );
74
- margin-top : -4px ;
67
+ .lsp-sort-icon {
68
+ top : -3px ;
75
69
left : 3px ;
70
+ position : relative;
71
+ height : 16px ;
72
+ width : 16px ;
73
+ display : block;
74
+ margin-left : auto;
76
75
}
77
76
78
- .lsp-sorted .lsp-descending .lsp-caret {
79
- background-image : var (--jp-icon-caretdown );
77
+ .lsp-sort-icon svg {
78
+ width : 20px ;
79
+ display : inline;
80
+ height : auto;
80
81
}
You can’t perform that action at this time.
0 commit comments