2024-06-21 09:26:04 +02:00
|
|
|
import DropdownButton from "./DropdownButton";
|
2024-06-20 15:43:14 +02:00
|
|
|
|
2024-06-21 09:26:04 +02:00
|
|
|
export default function Header({
|
|
|
|
onSave,
|
|
|
|
onReset,
|
|
|
|
onBuild,
|
|
|
|
onZip,
|
|
|
|
}: {
|
|
|
|
onSave: () => void;
|
|
|
|
onReset: () => void;
|
|
|
|
onBuild: () => void;
|
|
|
|
onZip: () => void;
|
|
|
|
}) {
|
2024-06-20 15:43:14 +02:00
|
|
|
return (
|
2024-06-21 09:26:04 +02:00
|
|
|
<header
|
|
|
|
style={{
|
|
|
|
display: "flex",
|
|
|
|
justifyContent: "space-between",
|
|
|
|
marginBottom: "0.5cm",
|
|
|
|
}}
|
|
|
|
>
|
2024-06-20 15:43:14 +02:00
|
|
|
<h1 id="_top">Playground</h1>
|
2024-06-21 09:26:04 +02:00
|
|
|
<div className="buttons" style={{ height: "100%" }}>
|
|
|
|
<DropdownButton
|
|
|
|
style={{ height: "100%", marginRight: "0.5cm"}}
|
|
|
|
visible={[["Save", onSave]]}
|
|
|
|
options={[["Reset", onReset]]}
|
|
|
|
/>
|
|
|
|
<DropdownButton
|
|
|
|
style={{ height: "100%" }}
|
|
|
|
visible={[["Build", onBuild]]}
|
|
|
|
options={[["Download zip", onZip]]}
|
|
|
|
/>
|
|
|
|
</div>
|
2024-06-20 15:43:14 +02:00
|
|
|
</header>
|
|
|
|
);
|
|
|
|
}
|