Files
klz-cables.com/.pnpm-store/v10/files/27/0a9041efdcab79d59a136d1568109ac9bac90e73c2a9f70907122d12d325f77cd3b30b9b9f3800966add7e67e6227d42dcf0ef8d4415c584f860aa5013f363
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

51 lines
1.3 KiB
Plaintext

'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import './index.scss';
const baseClass = 'popup-button';
export const PopupTrigger = props => {
const {
active,
button,
buttonType,
className,
disabled,
noBackground,
setActive,
size
} = props;
const classes = [baseClass, className, `${baseClass}--${buttonType}`, !noBackground && `${baseClass}--background`, size && `${baseClass}--size-${size}`, disabled && `${baseClass}--disabled`].filter(Boolean).join(' ');
const handleClick = () => {
setActive(!active, false);
};
const handleKeyDown = e => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
setActive(!active, true);
}
};
if (buttonType === 'none') {
return null;
}
if (buttonType === 'custom') {
return /*#__PURE__*/_jsx("div", {
className: classes,
onClick: handleClick,
onKeyDown: handleKeyDown,
role: "button",
tabIndex: 0,
children: button
});
}
return /*#__PURE__*/_jsx("button", {
className: classes,
disabled: disabled,
onClick: handleClick,
onKeyDown: handleKeyDown,
tabIndex: 0,
type: "button",
children: button
});
};
//# sourceMappingURL=index.js.map