1
1
import React , { FunctionComponent } from 'react'
2
2
import data from './contribution.json'
3
+ import './contribution.scss'
3
4
4
5
interface ContributionMDXProps {
5
6
name : string
@@ -12,33 +13,23 @@ const Contribution: FunctionComponent<ContributionMDXProps> = (props) => {
12
13
return (
13
14
< >
14
15
< h3 > Bugs & Tips </ h3 >
15
- < div style = { { margin : 0 } } >
16
+ < div className = 'qa-container' >
16
17
{ issues [ name ] . map ( ( item ) => (
17
- < div key = { item . number } style = { { margin : 2 } } >
18
+ < div key = { item . number } className = 'qa-list' >
18
19
< a
19
20
href = { item . url }
20
21
target = "_blank"
21
- style = { {
22
- display : 'block' ,
23
- textDecoration : 'none' ,
24
- color : '#576b95' ,
25
- fontSize : 14 ,
26
- } }
22
+ className = 'qa-list-item'
27
23
>
28
24
{ item . title }
29
25
</ a >
30
26
</ div >
31
27
) ) }
32
28
{ logs [ name ] . map ( ( item ) => (
33
- < div key = { item . version } style = { { margin : 2 } } >
29
+ < div key = { item . version } className = 'qa-list' >
34
30
< a
35
31
href = { item . content . match ( / \( \[ ( # \d + ) \] \( ( [ ^ ) ] + ) \) \) / ) ?. [ 2 ] }
36
- style = { {
37
- display : 'inline' ,
38
- textDecoration : 'none' ,
39
- color : '#576b95' ,
40
- fontSize : 14 ,
41
- } }
32
+ className = 'qa-list-item'
42
33
>
43
34
{ item . content
44
35
. replace ( / @ [ ^ \s ] + $ / , '' )
@@ -49,40 +40,31 @@ const Contribution: FunctionComponent<ContributionMDXProps> = (props) => {
49
40
''
50
41
) }
51
42
</ a >
52
- < span
53
- style = { {
54
- fontSize : 14 ,
55
- color : '#666' ,
56
- backgroundColor : '#f5f5f5' ,
57
- padding : '0 4px' ,
58
- borderRadius : 5 ,
59
- } }
60
- >
43
+ < span className = 'version-tag' >
61
44
{ item . version }
62
45
</ span >
63
46
</ div >
64
47
) ) }
48
+
49
+ < div className = 'qa-tips' >
50
+ < span > 查看更多 </ span >
51
+ < a
52
+ href = { `https://github.com/jdf2e/nutui-react/issues?q=is%3Aissue%20state%3Aclosed%20${ name . toLowerCase ( ) } ` }
53
+ className = 'qa-tips-link'
54
+ >
55
+ issues
56
+ </ a >
57
+ < span > and </ span >
58
+ < a
59
+ href = { `https://github.com/jdf2e/nutui-react/releases?q=${ name . toLowerCase ( ) } &expanded=true` }
60
+ className = 'qa-tips-link'
61
+ >
62
+ releases
63
+ </ a >
64
+ ,欢迎提交 PR。
65
+ </ div >
65
66
</ div >
66
- { issues [ name ] . length > 0 ||
67
- ( logs [ name ] . length > 0 && (
68
- < div style = { { fontSize : '14px' , color : '#666' , marginTop : '16px' } } >
69
- < span > View more resolved </ span >
70
- < a
71
- href = { `https://github.com/jdf2e/nutui-react/issues?q=is%3Aissue%20state%3Aclosed%20${ name . toLowerCase ( ) } ` }
72
- style = { { color : '#1677ff' , textDecoration : 'none' } }
73
- >
74
- issues
75
- </ a >
76
- < span > and </ span >
77
- < a
78
- href = { `https://github.com/jdf2e/nutui-react/releases?q=${ name . toLowerCase ( ) } &expanded=true` }
79
- style = { { color : '#1677ff' , textDecoration : 'none' } }
80
- >
81
- releases
82
- </ a >
83
- < span > for { name } </ span >
84
- </ div >
85
- ) ) }
67
+
86
68
</ >
87
69
)
88
70
}
0 commit comments