@bytebrand/fe-ui-core 4.2.10 → 4.2.11

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.2.10",
3
+ "version": "4.2.11",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -52,6 +52,9 @@ export const Theme = createTheme({
52
52
  '&:hover': {
53
53
  background: 'transparent !important'
54
54
  }
55
+ }),
56
+ ...(ownerState.isactive === 'true' && {
57
+ backgroundColor: 'rgba(0, 0, 0, 0.04)'
55
58
  })
56
59
  })
57
60
  }
@@ -10,15 +10,16 @@ interface IListItem {
10
10
  label: any;
11
11
  amount?: number;
12
12
  divider?: boolean;
13
- onClick?: () => void;
13
+ onClick?: (e: React.MouseEvent<HTMLSpanElement>) => void;
14
14
  href?: string;
15
15
  isComponent?: boolean;
16
16
  isSelect?: boolean;
17
17
  Link?: any;
18
18
  handleClose?: () => void;
19
+ isActive?: boolean;
19
20
  }
20
21
 
21
- const ListItem = ({ icon, label, amount, divider, onClick, href, isComponent, Link, handleClose }: IListItem) => {
22
+ const ListItem = ({ icon, label, amount, divider, onClick, href, isComponent, Link, handleClose, isActive }: IListItem) => {
22
23
  return !!href ? (
23
24
  <Link color='#4C4E64DE' variant='caption' to={href} underline='none' onClick={onClick}>
24
25
  <MenuItem
@@ -33,12 +34,13 @@ const ListItem = ({ icon, label, amount, divider, onClick, href, isComponent, Li
33
34
  </Link>
34
35
  ) : (
35
36
  <MenuItem
36
- onClick={() => {
37
- onClick();
37
+ onClick={(e: React.MouseEvent<HTMLSpanElement>) => {
38
+ onClick(e);
38
39
  handleClose();
39
40
  }}
40
41
  divider={divider}
41
42
  disableRipple={isComponent ? true : false}
43
+ isactive={!!isActive ? isActive.toString() : 'false'}
42
44
  >
43
45
  {icon && <ListItemIcon><IconSVG customDimensions name={icon} /></ListItemIcon>}
44
46
  <ListItemText>
@@ -46,7 +46,6 @@ const NestedMenu = ({ nestedItems, label, icon, amount }: INestedMenuProps) => {
46
46
  return (
47
47
  <ListItem
48
48
  key={index}
49
- onClick={() => {}}
50
49
  handleClose={() => {}}
51
50
  { ...nestedListItemProps }
52
51
  />