Skip to content

Commit 4eabe58

Browse files
authored
fix/COMPASS-9696 Pass actions to internal node (#120)
1 parent 3288564 commit 4eabe58

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/components/node/node.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const NodeHeader = styled.div<{ background?: string }>`
6666
line-height: 20px;
6767
font-weight: bold;
6868
min-height: ${DEFAULT_NODE_HEADER_HEIGHT}px;
69-
padding: ${spacing[100]}px ${spacing[400]}px ${spacing[100]}px ${spacing[200]}px;
69+
padding: 0px ${spacing[400]}px 0px ${spacing[200]}px;
7070
background: ${props => props.background};
7171
`;
7272

src/utilities/convert-nodes.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ describe('convert-nodes', () => {
7474
it('Should convert node props to internal node', () => {
7575
const node = {
7676
id: 'node-1',
77+
actions: 'pineapple',
7778
type: 'table' as const,
7879
position: { x: 100, y: 200 },
7980
title: 'some-title',
@@ -87,6 +88,7 @@ describe('convert-nodes', () => {
8788
position: { x: 100, y: 200 },
8889
connectable: false,
8990
data: {
91+
actions: 'pineapple',
9092
title: 'some-title',
9193
fields: [],
9294
borderVariant: undefined,

src/utilities/convert-nodes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ export const convertToExternalNodes = (nodes: InternalNode[]): NodeProps[] => {
1515
};
1616

1717
export const convertToInternalNode = (node: NodeProps): InternalNode => {
18-
const { title, fields, borderVariant, disabled, connectable, ...rest } = node;
18+
const { actions, title, fields, borderVariant, disabled, connectable, ...rest } = node;
1919
return {
2020
...rest,
2121
connectable: connectable ?? false,
2222
data: {
23+
actions,
2324
title,
2425
disabled,
2526
fields,

0 commit comments

Comments
 (0)