@bytebrand/fe-ui-core 4.1.56 → 4.1.58
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
|
@@ -2,7 +2,7 @@ import React, { useState, useRef } from 'react';
|
|
|
2
2
|
import Menu from '@mui/material/Menu';
|
|
3
3
|
import ListItem from './MaterialMenuItem';
|
|
4
4
|
import { ThemeProvider } from '@mui/material/styles';
|
|
5
|
-
import { Theme, FlexContainer } from './MaterialMenu.styled';
|
|
5
|
+
import { Theme, FlexContainer, HeaderComponent } from './MaterialMenu.styled';
|
|
6
6
|
import IconSVG from '../IconSVG/IconSVG';
|
|
7
7
|
|
|
8
8
|
export interface ILoggedInUserInfoProps {
|
|
@@ -36,29 +36,29 @@ const MaterialMenu = ({ menuItems, headerComponent, onChange, isLang, containerC
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
const containerRef = useRef(null);
|
|
40
|
-
|
|
41
39
|
return (
|
|
42
40
|
<ThemeProvider theme={Theme}>
|
|
43
|
-
<div className={containerClassname}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
<div className={containerClassname}>
|
|
42
|
+
<HeaderComponent
|
|
43
|
+
onClick={handleClick}
|
|
44
|
+
>
|
|
45
|
+
{headerComponent && headerComponent}
|
|
46
|
+
{(isLang && !!value) &&
|
|
47
|
+
<FlexContainer>
|
|
48
|
+
<IconSVG
|
|
49
|
+
customDimensions
|
|
50
|
+
width='42px'
|
|
51
|
+
height='27px'
|
|
52
|
+
name={`new_lang_${value}`}
|
|
53
|
+
/>
|
|
54
|
+
</FlexContainer>
|
|
55
|
+
}
|
|
56
|
+
</HeaderComponent>
|
|
55
57
|
<Menu
|
|
56
58
|
anchorEl={anchorEl}
|
|
57
59
|
open={open}
|
|
58
60
|
onClose={handleClose}
|
|
59
|
-
onClick={handleClose}
|
|
60
61
|
PaperProps={{
|
|
61
|
-
onMouseLeave: handleClose,
|
|
62
62
|
elevation: 0
|
|
63
63
|
}}
|
|
64
64
|
transformOrigin={{ horizontal: 'right', vertical: 'top' }}
|
|
@@ -69,7 +69,10 @@ const MaterialMenu = ({ menuItems, headerComponent, onChange, isLang, containerC
|
|
|
69
69
|
<ListItem
|
|
70
70
|
key={listItemProps.text}
|
|
71
71
|
selected={index === selectedIndex}
|
|
72
|
-
onClick={() =>
|
|
72
|
+
onClick={() => {
|
|
73
|
+
onHandleChange(listItemProps.value, index);
|
|
74
|
+
handleClose();
|
|
75
|
+
}}
|
|
73
76
|
isSelect={isSelect}
|
|
74
77
|
Link={Link}
|
|
75
78
|
{ ...listItemProps }
|