Files
parcer/src/components/molecules/SidePanelHeader.tsx

43 lines
1.3 KiB
TypeScript
Raw Normal View History

2024-06-24 22:39:54 +05:30
import React, { FC, useState } from 'react';
import { InterpretationButtons } from "./InterpretationButtons";
import { AddButton } from "../atoms/buttons/AddButton";
import { GenericModal } from "../atoms/GenericModal";
import { PairEditForm } from "./PairEditForm";
2024-07-31 22:46:38 +05:30
import { WhereWhatPair, WorkflowFile } from "maxun-core";
2024-06-24 22:39:54 +05:30
import { AddPair } from "../../api/workflow";
import { Button, Stack } from "@mui/material";
import { FastForward } from "@mui/icons-material";
import { useSocketStore } from "../../context/socket";
import { useGlobalInfoStore } from "../../context/globalInfo";
2024-10-19 14:02:08 +05:30
interface SidePanelHeaderProps {
setShowOutputData: (show: boolean) => void;
}
export const SidePanelHeader: React.FC<SidePanelHeaderProps> = ({ setShowOutputData }) => {
2024-06-24 22:39:54 +05:30
const [steppingIsDisabled, setSteppingIsDisabled] = useState(true);
const { socket } = useSocketStore();
const handleStep = () => {
socket?.emit('step');
};
return (
<div style={{width: 'inherit'}}>
2024-10-19 14:02:08 +05:30
<InterpretationButtons enableStepping={(isPaused) => setSteppingIsDisabled(!isPaused)} setShowOutputData={setShowOutputData} />
{/* <Button
2024-06-24 22:39:54 +05:30
variant='outlined'
disabled={steppingIsDisabled}
onClick={handleStep}
sx={{marginLeft:'15px'}}
>
step
<FastForward/>
2024-10-19 14:02:08 +05:30
</Button> */}
2024-06-24 22:39:54 +05:30
<hr/>
</div>
);
};