Files
klz-cables.com/.pnpm-store/v10/files/5c/ec0f66680943767f9b182afc3f856d4c7c3e6a4bd78b38ff2473fe71a2dc5c9eded1b7c88319b02c7bbd595e416368ea40f18cf0b05c022a327e11a6882fd2
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

34 lines
1.1 KiB
Plaintext

import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { EyeIcon } from '../../../icons/Eye/index.js';
import { useLivePreviewContext } from '../../../providers/LivePreview/context.js';
import { useTranslation } from '../../../providers/Translation/index.js';
import './index.scss';
const baseClass = 'live-preview-toggler';
export const LivePreviewToggler = () => {
const {
isLivePreviewing,
setIsLivePreviewing,
url: livePreviewURL
} = useLivePreviewContext();
const {
t
} = useTranslation();
if (!livePreviewURL) {
return null;
}
return /*#__PURE__*/_jsx("button", {
"aria-label": isLivePreviewing ? t('general:exitLivePreview') : t('general:livePreview'),
className: [baseClass, isLivePreviewing && `${baseClass}--active`].filter(Boolean).join(' '),
id: "live-preview-toggler",
onClick: () => {
setIsLivePreviewing(!isLivePreviewing);
},
title: isLivePreviewing ? t('general:exitLivePreview') : t('general:livePreview'),
type: "button",
children: /*#__PURE__*/_jsx(EyeIcon, {
active: isLivePreviewing
})
});
};
//# sourceMappingURL=index.js.map