This commit is contained in:
Marta Kowalska
2026-01-28 14:26:58 +00:00
parent a34aa9ad0a
commit 87a05884a8
24 changed files with 627 additions and 445 deletions
+14
View File
@@ -0,0 +1,14 @@
.button {
font-size: 14px;
line-height: 20px;
font-weight: 600;
padding: 5px 16px;
border: 1px solid transparent;
border-radius: 3px;
background-color: #f2f2f7;
color: #2c2f3c;
}
:global(.wx-willow-dark-theme .button) {
background-color: #384047;
color: rgba(255, 255, 255, 0.9);
}
+35
View File
@@ -0,0 +1,35 @@
import React, { useRef } from 'react';
import './UbloadButton.css';
function UploadButton({ text, onChange }) {
const fileInput = useRef(null);
function handleClick() {
fileInput.current?.click();
}
function handleChange() {
if (onChange) {
onChange();
}
}
return (
<>
<button className="button" onClick={handleClick}>
{text}
</button>
<input
ref={fileInput}
id="import-file"
type="file"
accept=".xml"
onChange={handleChange}
style={{ display: 'none' }}
/>
</>
);
}
export default UploadButton;