File tree Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 1
1
import React , { useState , useCallback } from 'react'
2
+ import { Typography } from 'antd'
2
3
import styled from '@emotion/styled'
3
4
import semver from 'semver'
4
5
import Diff from './Diff'
@@ -7,7 +8,7 @@ export const testIDs = {
7
8
diffSection : 'diffSection' ,
8
9
}
9
10
10
- const Title = styled . h1 `
11
+ const Title = styled ( Typography . Title ) `
11
12
margin-top: 0.5em;
12
13
`
13
14
@@ -46,7 +47,9 @@ const DiffSection = ({
46
47
return (
47
48
< div data-testid = { testIDs . diffSection } >
48
49
{ title && completedDiffs . length > 0 && (
49
- < Title ref = { doneTitleRef } > { title } </ Title >
50
+ < Title ref = { doneTitleRef } level = { 2 } >
51
+ { title }
52
+ </ Title >
50
53
) }
51
54
52
55
{ diff . map ( ( diffFile ) => {
Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ import { PACKAGE_NAMES } from '../../constants'
18
18
const Container = styled . div `
19
19
position: relative;
20
20
margin-top: 16px;
21
- color: rgba(0, 0, 0, 0.65);
22
21
overflow: hidden;
23
22
`
24
23
25
24
const InnerContainer = styled . div `
26
- color: rgba(0, 0, 0, 0.65);
27
- background-color: #fffbe6;
25
+ color: ${ ( { theme } ) =>
26
+ theme . text + 'D9' } ; // the D9 adds some transparency to the text color
27
+ background-color: ${ ( { theme } ) => theme . yellowBackground } ;
28
28
border-width: 1px;
29
29
border-left-width: 7px;
30
30
border-color: ${ ( { theme } ) => theme . yellowBorder } ;
@@ -112,16 +112,12 @@ const HideContentButton = styled(
112
112
border-width: 0px;
113
113
width: 20px;
114
114
height: 20px;
115
- color: rgba(0, 0, 0, 0.45);
116
- &:hover,
117
- &:focus {
118
- color: #24292e;
119
- }
115
+ color: ${ ( { theme } ) => theme . text + '73' } ; // 45% opacity
120
116
`
121
117
122
118
const Separator = styled . hr `
123
119
margin: 15px 0;
124
- background-color: #e1e4e8 ;
120
+ background-color: ${ ( { theme } ) => theme . border } ;
125
121
height: 0.25em;
126
122
border: 0;
127
123
`
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export const lightTheme = {
7
7
border : '#e8e8e8' ,
8
8
greenBorder : '#bef5cb' ,
9
9
yellowBorder : '#ffe58f' ,
10
+ yellowBackground : '#fffbe6' ,
10
11
11
12
diff : {
12
13
decoration : '#dbedff' ,
@@ -40,7 +41,8 @@ export const darkTheme = {
40
41
textHover : '#999' ,
41
42
border : '#888' ,
42
43
greenBorder : '#bef5cb' ,
43
- yellowBorder : '#ffe58f' ,
44
+ yellowBorder : '#c69026' ,
45
+ yellowBackground : '#37332A' ,
44
46
45
47
diff : {
46
48
decoration : '#dbedff' ,
You can’t perform that action at this time.
0 commit comments