11import React , { FunctionComponent } from 'react'
22import data from './contribution.json'
3+ import './contribution.scss'
34
45interface ContributionMDXProps {
56 name : string
@@ -12,33 +13,23 @@ const Contribution: FunctionComponent<ContributionMDXProps> = (props) => {
1213 return (
1314 < >
1415 < h3 > Bugs & Tips </ h3 >
15- < div style = { { margin : 0 } } >
16+ < div className = 'qa-container' >
1617 { issues [ name ] . map ( ( item ) => (
17- < div key = { item . number } style = { { margin : 2 } } >
18+ < div key = { item . number } className = 'qa-list' >
1819 < a
1920 href = { item . url }
2021 target = "_blank"
21- style = { {
22- display : 'block' ,
23- textDecoration : 'none' ,
24- color : '#576b95' ,
25- fontSize : 14 ,
26- } }
22+ className = 'qa-list-item'
2723 >
2824 { item . title }
2925 </ a >
3026 </ div >
3127 ) ) }
3228 { logs [ name ] . map ( ( item ) => (
33- < div key = { item . version } style = { { margin : 2 } } >
29+ < div key = { item . version } className = 'qa-list' >
3430 < a
3531 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'
4233 >
4334 { item . content
4435 . replace ( / @ [ ^ \s ] + $ / , '' )
@@ -49,40 +40,31 @@ const Contribution: FunctionComponent<ContributionMDXProps> = (props) => {
4940 ''
5041 ) }
5142 </ 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' >
6144 { item . version }
6245 </ span >
6346 </ div >
6447 ) ) }
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 >
6566 </ 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+
8668 </ >
8769 )
8870}
0 commit comments