@eqtylab/equality 2.2.2 → 2.2.3

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.
package/dist/index.cjs CHANGED
@@ -561,19 +561,25 @@ function Badge({
561
561
  }) {
562
562
  const effectiveIcon = icon ?? (variant ? defaultVariantIcons2[variant] : void 0);
563
563
  const renderClosable = () => {
564
- if (!closeable) return null;
565
- return /* @__PURE__ */ jsxRuntime.jsx(
566
- Button,
567
- {
568
- type: "button",
569
- variant: "tertiary",
570
- size: "sm",
571
- onClick: handleClosable,
572
- "aria-label": closeLabel,
573
- className: styles7__default.default["closable-btn"],
574
- children: /* @__PURE__ */ jsxRuntime.jsx(XIcon, {})
575
- }
576
- );
564
+ if (closeable && handleClosable) {
565
+ return /* @__PURE__ */ jsxRuntime.jsx(
566
+ Button,
567
+ {
568
+ type: "button",
569
+ variant: "tertiary",
570
+ size: "sm",
571
+ onPointerDown: (e) => e.stopPropagation(),
572
+ onClick: (e) => {
573
+ e.stopPropagation();
574
+ handleClosable();
575
+ },
576
+ "aria-label": closeLabel,
577
+ className: styles7__default.default["closable-btn"],
578
+ children: /* @__PURE__ */ jsxRuntime.jsx(XIcon, {})
579
+ }
580
+ );
581
+ }
582
+ return null;
577
583
  };
578
584
  const renderChildren = () => {
579
585
  const children = props.children;