Files
klz-cables.com/.pnpm-store/v10/files/71/0ab1f71f7fe2dd141afce7db439b01b4fd22e9c80728f2a1819a887d5f08590a88f66d44b379ca8166522dc769aab75367f9e54ffb0432c2116ebcee640df5
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

35 lines
898 B
Plaintext

'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React, { createContext, use } from 'react';
const Context = /*#__PURE__*/createContext({
isCollapsed: undefined,
isVisible: undefined,
isWithinCollapsible: undefined,
toggle: () => {}
});
export const CollapsibleProvider = ({
children,
isCollapsed,
isWithinCollapsible = true,
toggle
}) => {
const {
isCollapsed: parentIsCollapsed,
isVisible
} = useCollapsible();
const contextValue = React.useMemo(() => {
return {
isCollapsed,
isVisible: isVisible && !parentIsCollapsed,
isWithinCollapsible,
toggle
};
}, [isCollapsed, isWithinCollapsible, toggle, parentIsCollapsed, isVisible]);
return /*#__PURE__*/_jsx(Context, {
value: contextValue,
children: children
});
};
export const useCollapsible = () => use(Context);
//# sourceMappingURL=provider.js.map