-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
274 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 10 additions & 3 deletions
13
...-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCreateStepNode.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...c/modules/workflow/workflow-diagram/components/WorkflowDiagramStepNodeEditableContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { WorkflowDiagramStepNodeBase } from '@/workflow/workflow-diagram/components/WorkflowDiagramStepNodeBase'; | ||
import { WorkflowDiagramStepNodeData } from '@/workflow/workflow-diagram/types/WorkflowDiagram'; | ||
import { FloatingIconButton, IconTrash } from 'twenty-ui'; | ||
|
||
export const WorkflowDiagramStepNodeEditableContent = ({ | ||
data, | ||
selected, | ||
onDelete, | ||
}: { | ||
data: WorkflowDiagramStepNodeData; | ||
selected: boolean; | ||
onDelete: () => void; | ||
}) => { | ||
return ( | ||
<WorkflowDiagramStepNodeBase | ||
data={data} | ||
RightFloatingElement={ | ||
selected ? ( | ||
<FloatingIconButton | ||
size="medium" | ||
Icon={IconTrash} | ||
onClick={onDelete} | ||
/> | ||
) : undefined | ||
} | ||
/> | ||
); | ||
}; |
40 changes: 40 additions & 0 deletions
40
.../workflow/workflow-diagram/components/__stories__/WorkflowDiagramEmptyTrigger.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import { ComponentDecorator } from 'twenty-ui'; | ||
|
||
import { ReactFlowProvider } from '@xyflow/react'; | ||
import { WorkflowDiagramEmptyTrigger } from '../WorkflowDiagramEmptyTrigger'; | ||
|
||
const meta: Meta<typeof WorkflowDiagramEmptyTrigger> = { | ||
title: 'Modules/Workflow/WorkflowDiagramEmptyTrigger', | ||
component: WorkflowDiagramEmptyTrigger, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof WorkflowDiagramEmptyTrigger>; | ||
|
||
export const Default: Story = { | ||
decorators: [ | ||
ComponentDecorator, | ||
(Story) => ( | ||
<ReactFlowProvider> | ||
<Story /> | ||
</ReactFlowProvider> | ||
), | ||
], | ||
}; | ||
|
||
export const Selected: Story = { | ||
decorators: [ | ||
ComponentDecorator, | ||
(Story) => ( | ||
<ReactFlowProvider> | ||
<Story /> | ||
</ReactFlowProvider> | ||
), | ||
(Story) => ( | ||
<div className="selectable selected"> | ||
<Story /> | ||
</div> | ||
), | ||
], | ||
}; |
Oops, something went wrong.