more toolbar buttons
This commit is contained in:
parent
63265c2b4c
commit
39a229bf21
2 changed files with 8 additions and 7 deletions
|
|
@ -112,7 +112,7 @@ export function App() {
|
||||||
paddingLeft: 1,
|
paddingLeft: 1,
|
||||||
}}>
|
}}>
|
||||||
<AST {...{...ast, rt: rt.at(rtIdx!)}}/>
|
<AST {...{...ast, rt: rt.at(rtIdx!)}}/>
|
||||||
<hr/>
|
<br/>
|
||||||
<RTHistory {...{ast, rt, rtIdx, setTime, setRTIdx}}/>
|
<RTHistory {...{ast, rt, rtIdx, setTime, setRTIdx}}/>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
|
||||||
|
|
@ -102,13 +102,14 @@ export function TopPanel({rt, time, setTime, onInit, onClear, onRaise, ast, mode
|
||||||
return <>
|
return <>
|
||||||
<div className="toolbar">
|
<div className="toolbar">
|
||||||
{([
|
{([
|
||||||
["and", <RountangleIcon kind="and"/>],
|
["and", "AND-states", <RountangleIcon kind="and"/>],
|
||||||
["or", <RountangleIcon kind="or"/>],
|
["or", "OR-states", <RountangleIcon kind="or"/>],
|
||||||
["pseudo", <PseudoStateIcon/>],
|
["pseudo", "pseudo-states", <PseudoStateIcon/>],
|
||||||
["transition", <TrendingFlatIcon fontSize="small"/>],
|
["transition", "transitions", <TrendingFlatIcon fontSize="small"/>],
|
||||||
["text", <>T</>],
|
["text", "text", <>T</>],
|
||||||
] as [InsertMode, ReactElement][]).map(([m, buttonTxt]) =>
|
] as [InsertMode, string, ReactElement][]).map(([m, hint, buttonTxt]) =>
|
||||||
<button
|
<button
|
||||||
|
title={"insert "+hint}
|
||||||
disabled={mode===m}
|
disabled={mode===m}
|
||||||
onClick={() => setMode(m)}
|
onClick={() => setMode(m)}
|
||||||
>{buttonTxt}</button>)}
|
>{buttonTxt}</button>)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue