-
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.
refactor: extract constants into separate files
- Loading branch information
Showing
7 changed files
with
25 additions
and
17 deletions.
There are no files selected for viewing
17 changes: 6 additions & 11 deletions
17
...ty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramBaseStepNode.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
10 changes: 4 additions & 6 deletions
10
...-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
1 change: 1 addition & 0 deletions
1
packages/twenty-front/src/modules/workflow/workflow-diagram/constants/NodeBorderWidth.ts
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 @@ | ||
export const NODE_BORDER_WIDTH = 1; |
3 changes: 3 additions & 0 deletions
3
packages/twenty-front/src/modules/workflow/workflow-diagram/constants/NodeHandleHeightPx.ts
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,3 @@ | ||
import { NODE_HANDLE_WIDTH_PX } from './NodeHandleWidthPx'; | ||
|
||
export const NODE_HANDLE_HEIGHT_PX = NODE_HANDLE_WIDTH_PX; |
1 change: 1 addition & 0 deletions
1
packages/twenty-front/src/modules/workflow/workflow-diagram/constants/NodeHandleWidthPx.ts
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 @@ | ||
export const NODE_HANDLE_WIDTH_PX = 4; |
5 changes: 5 additions & 0 deletions
5
packages/twenty-front/src/modules/workflow/workflow-diagram/constants/NodeIconLeftMargin.ts
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,5 @@ | ||
import { THEME_COMMON } from 'twenty-ui'; | ||
|
||
export const NODE_ICON_LEFT_MARGIN = Number( | ||
THEME_COMMON.spacing(2).replace('px', ''), | ||
); |
5 changes: 5 additions & 0 deletions
5
packages/twenty-front/src/modules/workflow/workflow-diagram/constants/NodeIconWidth.ts
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,5 @@ | ||
import { THEME_COMMON } from 'twenty-ui'; | ||
|
||
export const NODE_ICON_WIDTH = Number( | ||
THEME_COMMON.spacing(6).replace('px', ''), | ||
); |