@tap-payments/os-micro-frontend-shared 0.0.233-test.20 → 0.0.233-test.21

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.
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { MultiSelectStatusButtonProps } from './type';
3
- declare function MultiSelectStatusButton({ options, selectedValues, onSelectionChange, label, variant, render, }: MultiSelectStatusButtonProps): import("react/jsx-runtime").JSX.Element;
3
+ declare function MultiSelectStatusButton({ options, selectedValues, onSelectionChange, label, variant }: MultiSelectStatusButtonProps): import("react/jsx-runtime").JSX.Element;
4
4
  declare const _default: import("react").MemoExoticComponent<typeof MultiSelectStatusButton>;
5
5
  export default _default;
@@ -8,7 +8,7 @@ import { closeXIcon } from '../../constants/index.js';
8
8
  import { ChevronContainer, Label, LabelWrapper, StyledStatusButton, ClearIcon, ChevronIconWrapper, } from './style';
9
9
  import Menu from '../Menu';
10
10
  import MenuItem from '../MenuItem';
11
- function MultiSelectStatusButton({ options = [], selectedValues, onSelectionChange, label, variant = 'inActive', render, }) {
11
+ function MultiSelectStatusButton({ options = [], selectedValues, onSelectionChange, label, variant = 'inActive' }) {
12
12
  const [anchorEl, setAnchorEl] = useState(null);
13
13
  const buttonRef = useRef(null);
14
14
  const [internalSelectedValues, setInternalSelectedValues] = useState(selectedValues);
@@ -54,6 +54,6 @@ function MultiSelectStatusButton({ options = [], selectedValues, onSelectionChan
54
54
  } }, { children: options.map((option) => (_jsx(MenuItem, Object.assign({ isSelected: isOptionSelected(option.status), onClick: (e) => {
55
55
  var _a;
56
56
  handleOptionToggle(e, (_a = option.status) !== null && _a !== void 0 ? _a : '');
57
- } }, { children: render ? render() : _jsx(Typography, Object.assign({ variant: "body2" }, { children: option.name })) })))) }))] }));
57
+ } }, { children: !!(option === null || option === void 0 ? void 0 : option.render) ? option === null || option === void 0 ? void 0 : option.render() : _jsx(Typography, Object.assign({ variant: "body2" }, { children: option.name })) })))) }))] }));
58
58
  }
59
59
  export default memo(MultiSelectStatusButton);
@@ -5,6 +5,7 @@ export interface CurrencyOption {
5
5
  name: string;
6
6
  flagCode?: string;
7
7
  status: TableHeaderStatus;
8
+ render?: () => JSX.Element;
8
9
  }
9
10
  export interface MultiSelectStatusButtonProps {
10
11
  options: CurrencyOption[];
@@ -12,5 +13,4 @@ export interface MultiSelectStatusButtonProps {
12
13
  onSelectionChange: (selected: TableHeaderStatus[]) => void;
13
14
  label?: string;
14
15
  variant?: 'active' | 'inActive';
15
- render?: () => JSX.Element;
16
16
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.0.233-test.20",
5
- "testVersion": 20,
4
+ "version": "0.0.233-test.21",
5
+ "testVersion": 21,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",