File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
packages/bundle-size-checker/src Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change 7
7
import { calculateSizeDiff } from './sizeDiff.js' ;
8
8
import { fetchSnapshot } from './fetchSnapshot.js' ;
9
9
import { displayPercentFormatter , byteSizeChangeFormatter } from './formatUtils.js' ;
10
- /**
11
- *
12
- * @param {'▲' | '▼' } symbol
13
- * @param {KatexColor } color
14
- * @returns
15
- */
16
- function formatSymbol ( symbol , color ) {
17
- return `<sup>\${\\tiny{\\color{${ color } }${ symbol } }}$</sup>` ;
18
- }
19
10
20
11
/**
21
12
* Generates a symbol based on the relative change value.
@@ -24,16 +15,16 @@ function formatSymbol(symbol, color) {
24
15
*/
25
16
function getChangeIcon ( relative ) {
26
17
if ( relative === null ) {
27
- return formatSymbol ( '▲' , 'orangered' ) ;
18
+ return '🔺' ;
28
19
}
29
20
if ( relative === - 1 ) {
30
- return formatSymbol ( '▼' , 'cornflowerblue' ) ;
21
+ return '▼' ;
31
22
}
32
23
if ( relative < 0 ) {
33
- return formatSymbol ( '▼' , 'green' ) ;
24
+ return '▼' ;
34
25
}
35
26
if ( relative > 0 ) {
36
- return formatSymbol ( '▲' , 'red' ) ;
27
+ return '🔺' ;
37
28
}
38
29
return ' ' ;
39
30
}
You can’t perform that action at this time.
0 commit comments