@tap-payments/os-micro-frontend-shared 0.1.179 → 0.1.180
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.
|
@@ -4,7 +4,8 @@ interface MenuItemProps extends BoxProps {
|
|
|
4
4
|
isSelected?: boolean;
|
|
5
5
|
isDisabled?: boolean;
|
|
6
6
|
isIndeterminate?: boolean;
|
|
7
|
+
hideCheckbox?: boolean;
|
|
7
8
|
}
|
|
8
|
-
declare function MenuItem({ isSelected, isDisabled, isIndeterminate, onClick, children, ...props }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function MenuItem({ isSelected, isDisabled, isIndeterminate, hideCheckbox, onClick, children, ...props }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
declare const _default: import("react").MemoExoticComponent<typeof MenuItem>;
|
|
10
11
|
export default _default;
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import { memo } from 'react';
|
|
14
14
|
import { CheckboxStyled, MenuItemStyled } from './style';
|
|
15
15
|
function MenuItem(_a) {
|
|
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: [
|
|
16
|
+
var { isSelected, isDisabled, isIndeterminate, hideCheckbox, onClick, children } = _a, props = __rest(_a, ["isSelected", "isDisabled", "isIndeterminate", "hideCheckbox", "onClick", "children"]);
|
|
17
|
+
return (_jsxs(MenuItemStyled, Object.assign({ className: isDisabled ? 'disabled menu-item' : 'menu-item', onClick: onClick, disabled: isDisabled }, props, { children: [!hideCheckbox && _jsx(CheckboxStyled, { size: "small", checked: isSelected, indeterminate: isIndeterminate, disabled: isDisabled }), children] })));
|
|
18
18
|
}
|
|
19
19
|
export default memo(MenuItem);
|
package/package.json
CHANGED