diff --git a/src/widgets/action-editor/ui/ActionEditor.tsx b/src/widgets/action-editor/ui/ActionEditor.tsx index fe1b1a7..eebd572 100644 --- a/src/widgets/action-editor/ui/ActionEditor.tsx +++ b/src/widgets/action-editor/ui/ActionEditor.tsx @@ -45,12 +45,16 @@ interface ActionEditorProps { actionIndex?: number; initialAction?: CommentAction; onSave?: (actionIndex: number, action: CommentAction) => Promise | void; + onClose?: () => Promise | void; + canExit?: boolean; } export default function ActionEditor({ actionIndex = 0, initialAction, onSave, + onClose, + canExit = false, }: ActionEditorProps) { const [value, setValue] = useState(0); @@ -117,7 +121,17 @@ export default function ActionEditor({ -
+
+ {canExit && ( + + )} +
+ ); + })} + +
+ +
);