structure refacto & file documentation
All checks were successful
Deploy Sokko G / deploy (push) Successful in 7s

This commit is contained in:
Shinuwa 2026-07-25 17:51:53 +02:00
parent d7871736c8
commit 895fec2b40
84 changed files with 2629 additions and 2313 deletions

View file

@ -0,0 +1,16 @@
// Rôle : encapsule l'input fichier JSON derrière un bouton d'import réutilisable.
import { Icon } from "./Icon.jsx";
export function ImportButton({ className, label, title, ariaLabel, icon, onFile }) {
return (
<label className={className} aria-label={ariaLabel} title={title}>
{icon && <Icon name={icon} />}
{label}
<input type="file" accept="application/json" hidden onChange={async (event) => {
const file = event.target.files?.[0];
if (file) await onFile(file);
event.target.value = "";
}} />
</label>
);
}