REFACTOR frontend

This commit is contained in:
2025-05-30 14:43:53 +02:00
parent fdaef02ef9
commit 1802659f43
8 changed files with 51 additions and 36 deletions

View File

@@ -0,0 +1,34 @@
import BlueButton from "../buttons/BlueButton.tsx";
import React from "react";
type props = {
dataSend: React.MouseEventHandler<HTMLButtonElement>;
handleDownload: React.MouseEventHandler<HTMLButtonElement>;
downloadable: boolean;
progress: number
}
const ExportWidget = ({dataSend, handleDownload, downloadable, progress}: props) => {
return (
<div className={"flex flex-col gap-3"}>
<BlueButton
onClick={dataSend}>
Export
</BlueButton>
{ downloadable ?
(<BlueButton
onClick={handleDownload}>
Download
</BlueButton>)
:(
<progress
value={progress}
className={"bg-gray-300 rounded-lg h-1"}>
</progress> )
}
</div>
)
}
export default ExportWidget;