initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
interface Props {
|
||||
time: number;
|
||||
onTick: () => void;
|
||||
onReset: () => void;
|
||||
onInitialize: () => void;
|
||||
}
|
||||
|
||||
export default function Topbar({ time, onTick, onReset, onInitialize }: Props) {
|
||||
return (
|
||||
<div className="topbar">
|
||||
<h1 className="topbar__title">
|
||||
Граф ресурсов
|
||||
<span>детерминированная тиковая симуляция</span>
|
||||
</h1>
|
||||
<div className="tick-counter">
|
||||
Время <b>{time}</b>
|
||||
</div>
|
||||
<div className="spacer" />
|
||||
<button className="btn" onClick={onInitialize}>
|
||||
Initialize
|
||||
</button>
|
||||
<button className="btn" onClick={onReset}>
|
||||
Reset
|
||||
</button>
|
||||
<button className="btn btn--primary" onClick={onTick}>
|
||||
Tick ▶
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user