Skip to content

Commit 7a62ca9

Browse files
committed
fix: Change style of description
1 parent ba76ad6 commit 7a62ca9

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

src/pages/Bugs/Detail/Description.tsx

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { MD } from '@appquality/unguess-design-system';
22
import { Bug } from 'src/features/api';
33
import styled from 'styled-components';
4-
import { theme as globalTheme } from 'src/app/theme';
54
import { useTranslation } from 'react-i18next';
65

76
const 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+
1425
export 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

Comments
 (0)