@appcorp/kismaa-web-ui 0.1.19 → 0.1.20

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.
@@ -8,6 +8,7 @@ var react_1 = __importDefault(require("react"));
8
8
  var kismaa_utils_1 = require("@appcorp/kismaa-utils");
9
9
  var util_functions_1 = require("@react-pakistan/util-functions");
10
10
  var type_1 = require("./type");
11
+ var outline_1 = require("@heroicons/react/24/outline");
11
12
  var classNameMap = function (type) {
12
13
  var _a;
13
14
  return (_a = {},
@@ -16,8 +17,11 @@ var classNameMap = function (type) {
16
17
  _a);
17
18
  };
18
19
  var Badge = function (_a) {
19
- var label = _a.label, type = _a.type;
20
+ var handleOnCrossClick = _a.handleOnCrossClick, label = _a.label, type = _a.type;
20
21
  var specialityType = (0, util_functions_1.textToEnum)(label);
21
- return (react_1.default.createElement("div", { className: "w-fit font-primary ".concat(classNameMap(specialityType)[type]) }, label));
22
+ return (react_1.default.createElement("div", { className: "flex w-fit flex-row items-center justify-center gap-2 font-primary ".concat(classNameMap(specialityType)[type]) },
23
+ label,
24
+ handleOnCrossClick && (react_1.default.createElement("button", { onClick: function () { return handleOnCrossClick(label); } },
25
+ react_1.default.createElement(outline_1.XMarkIcon, { className: "size-4" })))));
22
26
  };
23
27
  exports.Badge = Badge;
@@ -5,4 +5,5 @@ var type_1 = require("./type");
5
5
  exports.badgeData = {
6
6
  label: 'Love',
7
7
  type: type_1.BADGE_TYPE.FOOTER_BADGE,
8
+ handleOnCrossClick: function () { return void 0; },
8
9
  };
@@ -5,4 +5,5 @@ export declare enum BADGE_TYPE {
5
5
  export interface BadgeProps {
6
6
  label: string;
7
7
  type: BADGE_TYPE;
8
+ handleOnCrossClick?: (t: string) => void;
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/kismaa-web-ui",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "source": "src/index.ts",
5
5
  "main": "lib/main.js",
6
6
  "module": "lib/module.js",
@@ -42,8 +42,9 @@
42
42
  },
43
43
  "dependencies": {},
44
44
  "devDependencies": {
45
- "@appcorp/app-corp-designs": "^0.4.42",
46
- "@appcorp/kismaa-utils": "^0.1.34",
45
+ "@appcorp/app-corp-designs": "^0.4.43",
46
+ "@appcorp/app-corp-vista": "^0.0.4",
47
+ "@appcorp/kismaa-utils": "^0.1.36",
47
48
  "@chromatic-com/storybook": "3.2.2",
48
49
  "@eslint/compat": "^1.2.3",
49
50
  "@headlessui/react": "^2.2.0",