feat: pass setShowOutputData prop

This commit is contained in:
karishmas6
2024-10-19 14:02:08 +05:30
parent c48657ced8
commit 8e70f04332

View File

@@ -10,7 +10,11 @@ import { FastForward } from "@mui/icons-material";
import { useSocketStore } from "../../context/socket"; import { useSocketStore } from "../../context/socket";
import { useGlobalInfoStore } from "../../context/globalInfo"; import { useGlobalInfoStore } from "../../context/globalInfo";
export const SidePanelHeader = () => { interface SidePanelHeaderProps {
setShowOutputData: (show: boolean) => void;
}
export const SidePanelHeader: React.FC<SidePanelHeaderProps> = ({ setShowOutputData }) => {
const [steppingIsDisabled, setSteppingIsDisabled] = useState(true); const [steppingIsDisabled, setSteppingIsDisabled] = useState(true);
@@ -22,8 +26,8 @@ export const SidePanelHeader = () => {
return ( return (
<div style={{width: 'inherit'}}> <div style={{width: 'inherit'}}>
<InterpretationButtons enableStepping={(isPaused) => setSteppingIsDisabled(!isPaused)}/> <InterpretationButtons enableStepping={(isPaused) => setSteppingIsDisabled(!isPaused)} setShowOutputData={setShowOutputData} />
<Button {/* <Button
variant='outlined' variant='outlined'
disabled={steppingIsDisabled} disabled={steppingIsDisabled}
onClick={handleStep} onClick={handleStep}
@@ -31,7 +35,7 @@ export const SidePanelHeader = () => {
> >
step step
<FastForward/> <FastForward/>
</Button> </Button> */}
<hr/> <hr/>
</div> </div>
); );