feat: add on preview click
This commit is contained in:
@@ -2,7 +2,11 @@ import React, { FC, useState } from 'react';
|
|||||||
import { InterpretationButtons } from "../run/InterpretationButtons";
|
import { InterpretationButtons } from "../run/InterpretationButtons";
|
||||||
import { useSocketStore } from "../../context/socket";
|
import { useSocketStore } from "../../context/socket";
|
||||||
|
|
||||||
export const SidePanelHeader = () => {
|
interface SidePanelHeaderProps {
|
||||||
|
onPreviewClick?: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const SidePanelHeader = ({ onPreviewClick }: SidePanelHeaderProps) => {
|
||||||
|
|
||||||
const [steppingIsDisabled, setSteppingIsDisabled] = useState(true);
|
const [steppingIsDisabled, setSteppingIsDisabled] = useState(true);
|
||||||
|
|
||||||
@@ -14,7 +18,10 @@ export const SidePanelHeader = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ width: 'inherit' }}>
|
<div style={{ width: 'inherit' }}>
|
||||||
<InterpretationButtons enableStepping={(isPaused) => setSteppingIsDisabled(!isPaused)} />
|
<InterpretationButtons
|
||||||
|
enableStepping={(isPaused) => setSteppingIsDisabled(!isPaused)}
|
||||||
|
onPreviewComplete={onPreviewClick}
|
||||||
|
/>
|
||||||
{/* <Button
|
{/* <Button
|
||||||
variant='outlined'
|
variant='outlined'
|
||||||
disabled={steppingIsDisabled}
|
disabled={steppingIsDisabled}
|
||||||
|
|||||||
Reference in New Issue
Block a user