Files
klz-cables.com/.pnpm-store/v10/files/c2/7d9bde4238b1d22bf53afbd5e46fc9f9c526108c6d756976e58566d6c6eefbac9b9df67999792f6bb8ca457d6acc3b57ce07c2e762f1800a3f55a9995f2edc
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

40 lines
1.4 KiB
Plaintext

import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import './index.scss';
import { getTranslation } from '@payloadcms/translations';
import { FieldDiffLabel } from '../FieldDiffLabel/index.js';
const baseClass = 'field-diff';
export const FieldDiffContainer = args => {
const {
className,
From,
i18n,
label: {
label,
locale
},
nestingLevel = 0,
To
} = args;
return /*#__PURE__*/_jsxs("div", {
className: `${baseClass}-container${className ? ` ${className}` : ''} nested-level-${nestingLevel}`,
style: nestingLevel ? {
// Need to use % instead of fr, as calc() doesn't work with fr when this is used in gridTemplateColumns
'--left-offset': `calc(50% - (${nestingLevel} * calc( calc(var(--base)* 0.5) - 2.5px )))`
} : {
'--left-offset': '50%'
},
children: [/*#__PURE__*/_jsxs(FieldDiffLabel, {
children: [locale && /*#__PURE__*/_jsx("span", {
className: `${baseClass}__locale-label`,
children: locale
}), typeof label !== 'function' && getTranslation(label || '', i18n)]
}), /*#__PURE__*/_jsxs("div", {
className: `${baseClass}-content`,
style: nestingLevel ? {
gridTemplateColumns: `calc(var(--left-offset) - calc(var(--base)*0.5) ) calc(50% - calc(var(--base)*0.5) + calc(50% - var(--left-offset)))`
} : undefined,
children: [From, To]
})]
});
};
//# sourceMappingURL=index.js.map