Files
klz-cables.com/.pnpm-store/v10/files/d5/23e9c38d9d398d0b059875cada28ddcfb3a37f04a77afb762679efa6691c29192291a4f6f4e9e336b09288bff92972cdaf3c9f0c0a28042647c7dac3b3ca70
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

61 lines
1.8 KiB
Plaintext

'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { useTranslation } from '../../../providers/Translation/index.js';
import { Button } from '../../Button/index.js';
import { Dropzone } from '../../Dropzone/index.js';
import { DrawerHeader } from '../Header/index.js';
import './index.scss';
const baseClass = 'bulk-upload--add-files';
export function AddFilesView({
acceptMimeTypes,
onCancel,
onDrop
}) {
const {
t
} = useTranslation();
const inputRef = React.useRef(null);
return /*#__PURE__*/_jsxs("div", {
className: baseClass,
children: [/*#__PURE__*/_jsx(DrawerHeader, {
onClose: onCancel,
title: t('upload:addFiles')
}), /*#__PURE__*/_jsx("div", {
className: `${baseClass}__dropArea`,
children: /*#__PURE__*/_jsxs(Dropzone, {
multipleFiles: true,
onChange: onDrop,
children: [/*#__PURE__*/_jsx(Button, {
buttonStyle: "subtle",
iconPosition: "left",
onClick: () => {
if (inputRef.current) {
inputRef.current.click();
}
},
size: "small",
children: t('upload:selectFile')
}), /*#__PURE__*/_jsx("input", {
accept: acceptMimeTypes,
"aria-hidden": "true",
className: `${baseClass}__hidden-input`,
hidden: true,
multiple: true,
onChange: e => {
if (e.target.files && e.target.files.length > 0) {
onDrop(e.target.files);
}
},
ref: inputRef,
type: "file"
}), /*#__PURE__*/_jsxs("p", {
className: `${baseClass}__dragAndDropText`,
children: [t('general:or'), " ", t('upload:dragAndDrop')]
})]
})
})]
});
}
//# sourceMappingURL=index.js.map