Skip to content

Commit fcf481d

Browse files
committed
fix: refactor, add oldAttributes to mimic previous design (batch 1)
1 parent 2a6518d commit fcf481d

File tree

4 files changed

+7
-17
lines changed

4 files changed

+7
-17
lines changed

src/block/call-to-action/substitute.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,9 @@ export const substitute = {
44
return [
55
'stackable/columns',
66
{
7-
// TODO: See if passing the entire oldAttributes works.
87
...oldAttributes,
9-
// hasBackground: oldAttributes.hasBackground,
10-
// blockBackgroundMediaUrl: oldAttributes.blockBackgroundMediaUrl,
11-
// align: oldAttributes.align,
12-
// contentAlign: oldAttributes.contentAlign,
13-
// innerBlockContentAlign: oldAttributes.innerBlockContentAlign,
14-
// blockHeight: oldAttributes.blockHeight,
15-
// blockVerticalAlign: oldAttributes.blockVerticalAlign,
16-
// hasContainer: oldAttributes.hasContainer,
178
},
18-
[ 'stackable/column', {}, innerBlocks ],
9+
[ [ 'stackable/column', {}, innerBlocks ] ],
1910
]
2011
},
2112
}

src/block/card/substitute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const substitute = {
33
transform: ( oldAttributes, innerBlocks ) => {
44
return [
55
'stackable/columns',
6-
{},
6+
{ ...oldAttributes },
77
[
88
[
99
'stackable/column',

src/block/feature-grid/substitute.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
export const substitute = {
22
from: 'stackable/feature-grid',
3-
variants: [],
4-
to: [ 'stackable/columns' ],
53
transform: ( oldAttributes, innerBlocks ) => {
64
return [
75
'stackable/columns',
8-
{},
6+
{
7+
...oldAttributes,
8+
contentAlign: 'center',
9+
},
910
innerBlocks,
1011
]
1112
},

src/block/feature/substitute.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
export const substitute = {
22
from: 'stackable/feature',
3-
variants: [],
4-
to: [ 'stackable/columns' ],
53
transform: ( oldAttributes, innerBlocks ) => {
64
return [
75
'stackable/columns',
8-
{},
6+
{ ...oldAttributes },
97
innerBlocks,
108
]
119
},

0 commit comments

Comments
 (0)