toolbar button to undo last step
This commit is contained in:
parent
59d5e9913a
commit
5e60b3dc95
8 changed files with 99 additions and 31 deletions
|
|
@ -1,10 +1,22 @@
|
|||
import { useEffect, useState } from "react";
|
||||
import { TraceableError } from "../statecharts/parser";
|
||||
|
||||
import "./BottomPanel.css";
|
||||
|
||||
export function BottomPanel(props: {errors: TraceableError[]}) {
|
||||
return <div className="toolbar">
|
||||
<div className="errorStatus">{
|
||||
props.errors.length>0 && <>{props.errors.length} errors {props.errors.map(({message})=>message).join(',')}</>}</div>
|
||||
const [greeting, setGreeting] = useState("Welcome to StateBuddy, buddy!");
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setGreeting("");
|
||||
}, 2000);
|
||||
}, []);
|
||||
|
||||
return <div className="toolbar bottom">
|
||||
<>{greeting}</>
|
||||
{props.errors.length > 0 &&
|
||||
<div className="errorStatus">
|
||||
{props.errors.length>0 && <>{props.errors.length} errors: {props.errors.map(({message})=>message).join(', ')}</>}
|
||||
</div>}
|
||||
</div>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue