@@ -32,34 +32,77 @@ export const deprecateColumnAndRowGap = {
3232 const getAttribute = _attrName => attributes [ getAttrName ( _attrName ) ]
3333
3434 const columnSpacing = getAttribute ( 'columnSpacing' )
35+ const columnSpacingTablet = getAttribute ( 'columnSpacingTablet' )
36+ const columnSpacingMobile = getAttribute ( 'columnSpacingMobile' )
37+
3538 const columnGap = getAttribute ( 'columnGap' )
39+ const columnGapTablet = getAttribute ( 'columnGapTablet' )
40+ const columnGapMobile = getAttribute ( 'columnGapMobile' )
41+
3642 const rowGap = getAttribute ( 'rowGap' )
43+ const rowGapTablet = getAttribute ( 'rowGapTablet' )
44+ const rowGapMobile = getAttribute ( 'rowGapMobile' )
3745
38- return typeof columnSpacing === 'number' || typeof columnGap === 'number' || typeof rowGap === 'number'
46+ return (
47+ typeof columnSpacing === 'number' ||
48+ typeof columnSpacingTablet === 'number' ||
49+ typeof columnSpacingMobile === 'number' ||
50+ typeof columnGap === 'number' ||
51+ typeof columnGapTablet === 'number' ||
52+ typeof columnGapMobile === 'number' ||
53+ typeof rowGap === 'number' ||
54+ typeof rowGapTablet === 'number' ||
55+ typeof rowGapMobile === 'number'
56+ )
3957 } ,
58+
4059 migrate : attrNameTemplate => attributes => {
4160 const getAttrName = getAttrNameFunction ( attrNameTemplate )
4261 const getAttribute = _attrName => attributes [ getAttrName ( _attrName ) ]
4362
44- const newAttributes = {
45- ...attributes ,
46- }
63+ const newAttributes = { ...attributes }
4764
4865 const columnSpacing = getAttribute ( 'columnSpacing' )
66+ const columnSpacingTablet = getAttribute ( 'columnSpacingTablet' )
67+ const columnSpacingMobile = getAttribute ( 'columnSpacingMobile' )
68+
4969 const columnGap = getAttribute ( 'columnGap' )
70+ const columnGapTablet = getAttribute ( 'columnGapTablet' )
71+ const columnGapMobile = getAttribute ( 'columnGapMobile' )
72+
5073 const rowGap = getAttribute ( 'rowGap' )
74+ const rowGapTablet = getAttribute ( 'rowGapTablet' )
75+ const rowGapMobile = getAttribute ( 'rowGapMobile' )
5176
5277 if ( typeof columnSpacing === 'number' ) {
5378 newAttributes [ getAttrName ( 'columnSpacing' ) ] = String ( columnSpacing )
5479 }
80+ if ( typeof columnSpacingTablet === 'number' ) {
81+ newAttributes [ getAttrName ( 'columnSpacingTablet' ) ] = String ( columnSpacingTablet )
82+ }
83+ if ( typeof columnSpacingMobile === 'number' ) {
84+ newAttributes [ getAttrName ( 'columnSpacingMobile' ) ] = String ( columnSpacingMobile )
85+ }
5586
5687 if ( typeof columnGap === 'number' ) {
5788 newAttributes [ getAttrName ( 'columnGap' ) ] = String ( columnGap )
5889 }
90+ if ( typeof columnGapTablet === 'number' ) {
91+ newAttributes [ getAttrName ( 'columnGapTablet' ) ] = String ( columnGapTablet )
92+ }
93+ if ( typeof columnGapMobile === 'number' ) {
94+ newAttributes [ getAttrName ( 'columnGapMobile' ) ] = String ( columnGapMobile )
95+ }
5996
6097 if ( typeof rowGap === 'number' ) {
6198 newAttributes [ getAttrName ( 'rowGap' ) ] = String ( rowGap )
6299 }
100+ if ( typeof rowGapTablet === 'number' ) {
101+ newAttributes [ getAttrName ( 'rowGapTablet' ) ] = String ( rowGapTablet )
102+ }
103+ if ( typeof rowGapMobile === 'number' ) {
104+ newAttributes [ getAttrName ( 'rowGapMobile' ) ] = String ( rowGapMobile )
105+ }
63106
64107 return newAttributes
65108 } ,
0 commit comments