-
-
Notifications
You must be signed in to change notification settings - Fork 658
/
ChangeRequestReviewStatus.styles.ts
118 lines (103 loc) · 3.32 KB
/
ChangeRequestReviewStatus.styles.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import { styled } from '@mui/material';
import Cancel from '@mui/icons-material/Cancel';
import CheckCircle from '@mui/icons-material/CheckCircle';
import Schedule from '@mui/icons-material/Schedule';
import Edit from '@mui/icons-material/Edit';
import ErrorIcon from '@mui/icons-material/Error';
import PauseCircle from '@mui/icons-material/PauseCircle';
import { Box, Typography, Divider } from '@mui/material';
const styledComponentPropCheck = () => (prop: string) =>
prop !== 'color' &&
prop !== 'sx' &&
prop !== 'approved' &&
prop !== 'border' &&
prop !== 'bgColor' &&
prop !== 'svgColor';
export const StyledFlexAlignCenterBox = styled(Box)(({ theme }) => ({
display: 'flex',
alignItems: 'center',
}));
export const StyledErrorIcon = styled(Cancel)(({ theme }) => ({
color: theme.palette.error.main,
height: '35px',
width: '35px',
marginRight: theme.spacing(1),
}));
export const StyledWarningIcon = styled(Cancel)(({ theme }) => ({
color: theme.palette.warning.main,
height: '35px',
width: '35px',
marginRight: theme.spacing(1),
}));
export const StyledSuccessIcon = styled(CheckCircle)(({ theme }) => ({
color: theme.palette.success.main,
height: '35px',
width: '35px',
marginRight: theme.spacing(1),
}));
export const StyledScheduledIcon = styled(Schedule)(({ theme }) => ({
color: theme.palette.warning.main,
height: '35px',
width: '35px',
marginRight: theme.spacing(1),
}));
export const StyledScheduleFailedIcon = styled(ErrorIcon)(({ theme }) => ({
color: theme.palette.error.main,
height: '35px',
width: '35px',
marginRight: theme.spacing(1),
}));
export const StyledScheduleSuspendedIcon = styled(PauseCircle)(({ theme }) => ({
color: theme.palette.text.secondary,
height: '35px',
width: '35px',
marginRight: theme.spacing(1),
}));
export const StyledEditIcon = styled(Edit)(({ theme }) => ({
color: theme.palette.text.secondary,
height: '24px',
width: '24px',
}));
export const StyledOuterContainer = styled(Box)(({ theme }) => ({
display: 'flex',
marginTop: theme.spacing(2),
}));
export const StyledButtonContainer = styled(Box, {
shouldForwardProp: styledComponentPropCheck(),
})<{ bgColor: string; svgColor: string }>(({ theme, bgColor, svgColor }) => ({
borderRadius: `${theme.shape.borderRadiusMedium}px`,
backgroundColor: bgColor,
padding: theme.spacing(1, 2),
marginRight: theme.spacing(2),
height: '45px',
width: '45px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
svg: {
color: svgColor,
},
}));
export const StyledDivider = styled(Divider)(({ theme }) => ({
margin: theme.spacing(2.5, 0),
}));
export const StyledReviewStatusContainer = styled(Box, {
shouldForwardProp: styledComponentPropCheck(),
})<{ border: string }>(({ theme, border }) => ({
borderRadius: `${theme.shape.borderRadiusLarge}px`,
border: border,
padding: theme.spacing(3),
width: '100%',
}));
export const StyledReviewTitle = styled(Typography, {
shouldForwardProp: styledComponentPropCheck(),
})<{ color: string }>(({ theme, color }) => ({
fontWeight: 'bold',
color,
}));
export const StyledScheduledBox = styled(Box)({
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
width: '100%',
});