hrm_ui_lib 2.4.25 → 2.4.26

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.
@@ -10,7 +10,7 @@ export const ButtonGroup = ({ buttons, activeIndex = 0, className, type, size, d
10
10
  setActiveItem(index);
11
11
  onTabChange === null || onTabChange === void 0 ? void 0 : onTabChange(index);
12
12
  };
13
- return (_jsx("div", { className: classNames('button-group', className), children: buttons.map((button, index) => {
14
- return (_jsx(ButtonGroupItem, Object.assign({}, button, { type: type, size: size, isActive: activeItem === index, disabled: disabled, onClick: () => handleItemClick(index) }), index));
13
+ return (_jsx("div", { className: classNames('button-group', className), children: buttons.map((button) => {
14
+ return (_jsx(ButtonGroupItem, Object.assign({}, button, { type: type, size: size, isActive: activeItem === button.id, disabled: disabled, onClick: () => handleItemClick(button.id) }), `buttonGroup_${button.id}`));
15
15
  }) }));
16
16
  };
@@ -8,7 +8,7 @@ interface IButtonGroupBase {
8
8
  export interface IButtonGroupItem extends IButtonGroupBase {
9
9
  buttonText: string;
10
10
  isActive?: boolean;
11
- id?: string | number;
11
+ id: string | number;
12
12
  onClick?: () => void;
13
13
  icons?: {
14
14
  left?: ISVGIconProps;
@@ -17,7 +17,7 @@ export interface IButtonGroupItem extends IButtonGroupBase {
17
17
  }
18
18
  export interface IButtonGroup extends IButtonGroupBase {
19
19
  buttons: IButtonGroupItem[];
20
- activeIndex: number;
21
- onTabChange?: (index: number) => void;
20
+ activeIndex: number | string;
21
+ onTabChange?: (index: number | string) => void;
22
22
  }
23
23
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hrm_ui_lib",
3
- "version": "2.4.25",
3
+ "version": "2.4.26",
4
4
  "description": "UI library for Dino",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",