shulkerscript-webpage/src/components/playground/Header.tsx

38 lines
1010 B
TypeScript
Raw Normal View History

import DropdownButton from "./DropdownButton";
2024-06-20 15:43:14 +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 (
<header
style={{
display: "flex",
justifyContent: "space-between",
marginBottom: "0.5cm",
}}
>
2024-06-20 15:43:14 +02:00
<h1 id="_top">Playground</h1>
<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>
);
}