@campxdev/react-blueprint 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IconButton,
|
|
3
|
-
Stack,
|
|
4
|
-
SxProps,
|
|
5
|
-
useMediaQuery,
|
|
6
|
-
useTheme,
|
|
7
|
-
} from '@mui/material';
|
|
1
|
+
import { Stack, SxProps, useMediaQuery, useTheme } from '@mui/material';
|
|
8
2
|
import { ReactNode } from 'react';
|
|
9
|
-
import { ReportIssueIcon } from '../../Assets/Icons/IconComponents/ReportIssueIcon';
|
|
10
3
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
11
|
-
import { Button } from '../../export';
|
|
12
4
|
import UserBox from './AppHeaderActions/UserBox';
|
|
13
|
-
import {
|
|
5
|
+
import { StyledHeader } from './styles/styles';
|
|
14
6
|
|
|
15
|
-
export
|
|
7
|
+
export type AppHeaderProps = {
|
|
16
8
|
actions?: ReactNode[];
|
|
9
|
+
profileActions?: ReactNode[];
|
|
17
10
|
appsMenu?: ReactNode;
|
|
18
11
|
clientLogoUrl?: string;
|
|
19
12
|
clientName?: string;
|
|
@@ -25,10 +18,11 @@ export interface AppHeaderProps {
|
|
|
25
18
|
onLogoutClick?: any;
|
|
26
19
|
showActiveDevices?: boolean;
|
|
27
20
|
headerSx?: SxProps;
|
|
28
|
-
}
|
|
21
|
+
};
|
|
29
22
|
|
|
30
23
|
export const AppHeader = ({
|
|
31
24
|
actions = [],
|
|
25
|
+
profileActions = [],
|
|
32
26
|
profileSx = {},
|
|
33
27
|
clientLogoUrl,
|
|
34
28
|
onLogoutClick,
|
|
@@ -43,9 +37,6 @@ export const AppHeader = ({
|
|
|
43
37
|
const theme = useTheme();
|
|
44
38
|
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
|
|
45
39
|
|
|
46
|
-
const handleReportIssue = () => {
|
|
47
|
-
window.open('https://helpdesk.campx.in/helpdesk/my-tickets', '_blank');
|
|
48
|
-
};
|
|
49
40
|
return (
|
|
50
41
|
<StyledHeader
|
|
51
42
|
collapsed={collapsed}
|
|
@@ -55,47 +46,13 @@ export const AppHeader = ({
|
|
|
55
46
|
<Typography variant={isSmallScreen ? 'subtitle3' : 'subtitle2'}>
|
|
56
47
|
{clientName}
|
|
57
48
|
</Typography>
|
|
49
|
+
|
|
58
50
|
<Stack alignItems={'center'} gap={'12px'} flexDirection={'row'}>
|
|
59
|
-
{
|
|
60
|
-
|
|
61
|
-
href={'https://helpdesk.campx.in/helpdesk/my-tickets'}
|
|
62
|
-
target="_blank"
|
|
63
|
-
rel="noreferrer"
|
|
64
|
-
style={{ textDecoration: 'none' }}
|
|
65
|
-
>
|
|
66
|
-
<HelpIcon size={20} />
|
|
67
|
-
</a>
|
|
68
|
-
</StyledIconButton> */}
|
|
69
|
-
{isSmallScreen ? (
|
|
70
|
-
<>
|
|
71
|
-
<IconButton
|
|
72
|
-
sx={{ padding: '0px' }}
|
|
73
|
-
className="reportAnIssue"
|
|
74
|
-
onClick={handleReportIssue}
|
|
75
|
-
>
|
|
76
|
-
<ReportIssueIcon />
|
|
77
|
-
</IconButton>
|
|
78
|
-
<StyledDivider flexItem />
|
|
79
|
-
</>
|
|
80
|
-
) : (
|
|
81
|
-
<Button
|
|
82
|
-
variant="outlined"
|
|
83
|
-
className="reportAnIssue"
|
|
84
|
-
onClick={handleReportIssue}
|
|
85
|
-
>
|
|
86
|
-
<Typography
|
|
87
|
-
variant="button"
|
|
88
|
-
sx={{
|
|
89
|
-
fontWeight: 'bold',
|
|
90
|
-
}}
|
|
91
|
-
>
|
|
92
|
-
Report an Issue
|
|
93
|
-
</Typography>
|
|
94
|
-
</Button>
|
|
95
|
-
)}
|
|
51
|
+
{actions.map((action) => action)}
|
|
52
|
+
|
|
96
53
|
<UserBox
|
|
97
54
|
fullName={userFullName}
|
|
98
|
-
actions={
|
|
55
|
+
actions={profileActions}
|
|
99
56
|
institutionsData={institutionsData}
|
|
100
57
|
profileSx={profileSx}
|
|
101
58
|
designation={designation}
|