Skip to content

Commit a656567

Browse files
authored
Merge pull request #466 from kgryte/commit-stats-icons
Color insertion and deletion icons
2 parents c3582e8 + 23613cd commit a656567

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

src/components/SinglePastCommitInfo.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import {
1919
fileList,
2020
floatRightStyle,
2121
iconStyle,
22+
insertionsIconStyle,
23+
deletionsIconStyle,
2224
revertButtonStyle
2325
} from '../style/SinglePastCommitInfoStyle';
2426
import { Git } from '../tokens';
@@ -140,7 +142,7 @@ export class SinglePastCommitInfo extends React.Component<
140142
<span>
141143
<DefaultIconReact
142144
name="git-insertionsMade"
143-
className={iconStyle}
145+
className={classes(iconStyle, insertionsIconStyle)}
144146
tag="span"
145147
title="# Insertions"
146148
/>
@@ -149,7 +151,7 @@ export class SinglePastCommitInfo extends React.Component<
149151
<span>
150152
<DefaultIconReact
151153
name="git-deletionsMade"
152-
className={iconStyle}
154+
className={classes(iconStyle, deletionsIconStyle)}
153155
tag="span"
154156
title="# Deletions"
155157
/>

src/style/SinglePastCommitInfoStyle.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,22 @@ export const iconStyle = style({
7272
right: '10px'
7373
});
7474

75+
export const insertionsIconStyle = style({
76+
$nest: {
77+
'.jp-icon3': {
78+
fill: '#00dc00'
79+
}
80+
}
81+
});
82+
83+
export const deletionsIconStyle = style({
84+
$nest: {
85+
'.jp-icon3': {
86+
fill: '#ff0000'
87+
}
88+
}
89+
});
90+
7591
export const diffIconStyle = style({
7692
backgroundColor: 'transparent',
7793
backgroundPosition: 'center',

0 commit comments

Comments
 (0)