Skip to content

Commit cf77a0f

Browse files
committed
add buttons from hoverbutton for accessibility
1 parent 3d8f230 commit cf77a0f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

ui/src/components/repo/pod.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import PlayArrowIcon from "@mui/icons-material/PlayArrow";
2121
import { AiOutlineFunction } from "react-icons/ai";
2222
import { GiPlatform } from "react-icons/gi";
2323
import Ansi from "ansi-to-react";
24+
import FastForwardIcon from "@mui/icons-material/FastForward";
2425

2526
import {
2627
DndContext,
@@ -293,6 +294,7 @@ export function DeckTitle({ id }) {
293294
rounded: "md",
294295
boxShadow: "2xl",
295296
flexDir: "row",
297+
alignItems: "center",
296298
}}
297299
visibility={showMenu ? "visible" : "hidden"}
298300
// visibility="visible"
@@ -336,10 +338,40 @@ export function DeckTitle({ id }) {
336338
}
337339
/>
338340

341+
<IconButton
342+
variant="ghost"
343+
size="xs"
344+
onClick={() => {
345+
dispatch(
346+
qActions.remoteAdd({
347+
parent: pod.id,
348+
index: 0,
349+
type: "CODE",
350+
lang: pod.lang,
351+
column: pod.column,
352+
})
353+
);
354+
}}
355+
>
356+
+
357+
</IconButton>
358+
339359
{pod.id !== "ROOT" && <DeleteButton pod={pod} />}
340360
{pod.id !== "ROOT" && <FoldButton pod={pod} />}
341361
{/* Run button, with hovering support */}
342362
<DeckRunButton id={id} />
363+
<IconButton
364+
variant="ghost"
365+
sx={{
366+
color: "green",
367+
}}
368+
size="small"
369+
onClick={() => {
370+
dispatch(wsActions.wsPowerRun({ id }));
371+
}}
372+
>
373+
<FastForwardIcon fontSize="small" />
374+
</IconButton>
343375
</Box>
344376
</Box>
345377
</Box>
@@ -945,6 +977,7 @@ function PodWrapper({ id, draghandle, children }) {
945977
background: grey[50],
946978
rounded: "md",
947979
boxShadow: "2xl",
980+
alignItems: "center",
948981
}}
949982
visibility={showMenu ? "visible" : "hidden"}
950983
display={showMenu ? "inherit" : "none"}

0 commit comments

Comments
 (0)