8726 workflow add a test button in workflow code step (#9016)
- add test button to workflow code step - add test tab to workflow code step https://github.com/user-attachments/assets/e180a827-7321-49a2-8026-88490c557da2  
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
import { Button } from 'twenty-ui';
|
||||
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
|
||||
import { Key } from 'ts-key-enum';
|
||||
import { RightDrawerHotkeyScope } from '@/ui/layout/right-drawer/types/RightDrawerHotkeyScope';
|
||||
|
||||
export const CmdEnterActionButton = ({
|
||||
title,
|
||||
onClick,
|
||||
}: {
|
||||
title: string;
|
||||
onClick: () => void;
|
||||
}) => {
|
||||
useScopedHotkeys(
|
||||
[`${Key.Control}+${Key.Enter}`, `${Key.Meta}+${Key.Enter}`],
|
||||
() => onClick(),
|
||||
RightDrawerHotkeyScope.RightDrawer,
|
||||
[onClick],
|
||||
);
|
||||
|
||||
return (
|
||||
<Button
|
||||
title={title}
|
||||
variant="primary"
|
||||
accent="blue"
|
||||
size="medium"
|
||||
onClick={onClick}
|
||||
shortcut={'⌘⏎'}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user