@tap-payments/os-micro-frontend-shared 0.0.221 → 0.0.222
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.
|
@@ -14,6 +14,6 @@ import { memo } from 'react';
|
|
|
14
14
|
import { CheckboxStyled, MenuItemStyled } from './style';
|
|
15
15
|
function MenuItem(_a) {
|
|
16
16
|
var { isSelected, isDisabled, isIndeterminate, onClick, children } = _a, props = __rest(_a, ["isSelected", "isDisabled", "isIndeterminate", "onClick", "children"]);
|
|
17
|
-
return (_jsxs(MenuItemStyled, Object.assign({ className: isDisabled ? 'disabled menu-item' : 'menu-item', onClick: onClick, disabled: isDisabled }, props, { children: [isSelected !== undefined && _jsx(CheckboxStyled, { size: "small", checked: isSelected,
|
|
17
|
+
return (_jsxs(MenuItemStyled, Object.assign({ className: isDisabled ? 'disabled menu-item' : 'menu-item', onClick: onClick, disabled: isDisabled }, props, { children: [isSelected !== undefined && _jsx(CheckboxStyled, { size: "small", checked: isSelected, indeterminate: isIndeterminate, disabled: isDisabled }), children] })));
|
|
18
18
|
}
|
|
19
19
|
export default memo(MenuItem);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Box from '@mui/material/Box';
|
|
2
|
-
import { styled } from '@mui/material/styles';
|
|
2
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
3
3
|
import Checkbox from '../Checkbox';
|
|
4
4
|
export const MenuItemStyled = styled(Box, { shouldForwardProp: (props) => props !== 'disabled' })(({ theme, disabled }) => ({
|
|
5
5
|
fontWeight: theme.typography.fontWeightMedium,
|
|
@@ -15,7 +15,7 @@ export const MenuItemStyled = styled(Box, { shouldForwardProp: (props) => props
|
|
|
15
15
|
lineHeight: '15px',
|
|
16
16
|
color: theme.palette.text.primary,
|
|
17
17
|
}));
|
|
18
|
-
export const CheckboxStyled = styled(Checkbox)(() => ({
|
|
18
|
+
export const CheckboxStyled = styled(Checkbox)(({ theme }) => ({
|
|
19
19
|
padding: 0,
|
|
20
20
|
paddingRight: '4px',
|
|
21
21
|
width: '14px !important',
|
|
@@ -23,4 +23,9 @@ export const CheckboxStyled = styled(Checkbox)(() => ({
|
|
|
23
23
|
width: '12px !important',
|
|
24
24
|
height: '12px !important',
|
|
25
25
|
},
|
|
26
|
+
'&.Mui-disabled': {
|
|
27
|
+
'[data-testid="IndeterminateCheckBoxIcon"]': {
|
|
28
|
+
fill: alpha(theme.palette.common.black, 0.26),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
26
31
|
}));
|
package/package.json
CHANGED