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

43 lines
1.2 KiB
Plaintext

'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { Button } from '../../elements/Button/index.js';
import { useForm, useFormBackgroundProcessing, useFormInitializing, useFormProcessing } from '../Form/context.js';
import './index.scss';
const baseClass = 'form-submit';
export const FormSubmit = props => {
const {
type = 'submit',
buttonId: id,
children,
disabled: disabledFromProps,
onClick,
programmaticSubmit,
ref
} = props;
const processing = useFormProcessing();
const backgroundProcessing = useFormBackgroundProcessing();
const initializing = useFormInitializing();
const {
disabled,
submit
} = useForm();
const canSave = !(disabledFromProps || initializing || processing || backgroundProcessing || disabled);
const handleClick = onClick ?? (programmaticSubmit ? () => {
void submit();
} : undefined);
return /*#__PURE__*/_jsx("div", {
className: baseClass,
children: /*#__PURE__*/_jsx(Button, {
ref: ref,
...props,
disabled: canSave ? undefined : true,
id: id,
onClick: handleClick,
type: type,
children: children
})
});
};
//# sourceMappingURL=index.js.map