Skip to content

Commit dc5bee1

Browse files
updated some substitutions
1 parent 80d7123 commit dc5bee1

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed

src/block/count-up/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import schema from './schema'
1515
import metadata from './block.json'
1616
import example from './example'
1717
import deprecated from './deprecated'
18+
import substitute from './substitute'
1819

1920
export const settings = {
2021
...metadata,
@@ -29,4 +30,5 @@ export const settings = {
2930
deprecated,
3031
edit,
3132
save,
33+
substitute,
3234
}

src/block/count-up/substitute.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export const substitute = {
2+
from: 'stackable/count-up',
3+
to: 'core/paragraph',
4+
transform: oldAttributes => {
5+
return {
6+
fontSize: 'x-large',
7+
content: oldAttributes.text,
8+
align: oldAttributes.contentAlign,
9+
}
10+
},
11+
}
12+
13+
export default substitute

src/block/image/substitute.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ export const substitute = {
33
to: 'core/image',
44
transform: oldAttributes => {
55
if ( oldAttributes ) {
6-
return { height: oldAttributes.imageHeight }
6+
return {
7+
height: oldAttributes.imageHeight,
8+
url: oldAttributes.imageUrl,
9+
}
710
}
811
},
912
}

src/block/price/substitute.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const substitute = {
88
}
99
return [ 'core/paragraph', {
1010
fontSize: 'x-large',
11+
align: oldAttributes.contentAlign,
1112
content,
1213
} ]
1314
},

src/block/subtitle/substitute.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ export const substitute = {
33
to: 'core/paragraph',
44
transform: oldAttributes => {
55
return {
6+
fontSize: 'small',
7+
align: oldAttributes.contentAlign,
68
content: oldAttributes.text,
79
}
810
},

0 commit comments

Comments
 (0)