11import { MD } from '@appquality/unguess-design-system' ;
22import { Bug } from 'src/features/api' ;
33import styled from 'styled-components' ;
4- import { theme as globalTheme } from 'src/app/theme' ;
54import { useTranslation } from 'react-i18next' ;
65
76const Container = styled . div `
@@ -11,6 +10,18 @@ const Container = styled.div`
1110 white-space: pre-wrap;
1211` ;
1312
13+ const Label = styled ( ( { children, className, style } ) => (
14+ < MD className = { className } style = { style } isBold >
15+ { children }
16+ </ MD >
17+ ) ) `
18+ margin: ${ ( { theme } ) => `${ theme . space . sm } 0 ${ theme . space . xs } 0 ` } ;
19+ ` ;
20+
21+ const Text = styled ( MD ) `
22+ color: ${ ( { theme } ) => theme . palette . grey [ 700 ] } ;
23+ ` ;
24+
1425export default ( {
1526 bug,
1627} : {
@@ -25,24 +36,18 @@ export default ({
2536
2637 return (
2738 < Container >
28- < MD isBold style = { { marginBottom : globalTheme . space . sm } } >
39+ < Label style = { { marginTop : 0 } } >
2940 { t ( '__BUGS_PAGE_BUG_DETAIL_DESCRIPTION_LABEL' ) }
30- </ MD >
31- < MD > { bug . step_by_step } </ MD >
32- < MD isBold style = { { margin : `${ globalTheme . space . sm } 0` } } >
33- { t ( '__BUGS_PAGE_BUG_DETAIL_EXPECTED_RESULT_LABEL' ) }
34- </ MD >
35- < MD > { bug . expected_result } </ MD >
36- < MD isBold style = { { margin : `${ globalTheme . space . sm } 0` } } >
37- { t ( '__BUGS_PAGE_BUG_DETAIL_CURRENT_RESULT_LABEL' ) }
38- </ MD >
39- < MD > { bug . current_result } </ MD >
41+ </ Label >
42+ < Text > { bug . step_by_step } </ Text >
43+ < Label > { t ( '__BUGS_PAGE_BUG_DETAIL_EXPECTED_RESULT_LABEL' ) } </ Label >
44+ < Text > { bug . expected_result } </ Text >
45+ < Label > { t ( '__BUGS_PAGE_BUG_DETAIL_CURRENT_RESULT_LABEL' ) } </ Label >
46+ < Text > { bug . current_result } </ Text >
4047 { bug . note && (
4148 < >
42- < MD isBold style = { { margin : `${ globalTheme . space . sm } 0` } } >
43- { t ( '__BUGS_PAGE_BUG_DETAIL_ADDITIONAL_NOTES_LABEL' ) }
44- </ MD >
45- < MD > { bug . note } </ MD >
49+ < Label > { t ( '__BUGS_PAGE_BUG_DETAIL_ADDITIONAL_NOTES_LABEL' ) } </ Label >
50+ < Text > { bug . note } </ Text >
4651 </ >
4752 ) }
4853 </ Container >
0 commit comments