Skip to content

Commit 278337d

Browse files
authored
feat (icon list): added row gap option. (#2147)
* Add slider for list gap. * Fix rowGap setting not being persisted.
1 parent 087e37f commit 278337d

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

src/block/icon-list/edit.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,14 @@ const Edit = props => {
218218
responsive="all"
219219
/>
220220

221+
<AdvancedRangeControl
222+
label={ __( 'Row Gap', i18n ) }
223+
attribute="rowGap"
224+
min="0"
225+
sliderMax="50"
226+
responsive="all"
227+
/>
228+
221229
<AdvancedRangeControl
222230
label={ __( 'Icon Gap', i18n ) }
223231
attribute="iconGap"

src/block/icon-list/schema.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ export const iconListAttributes = {
8181
type: 'number',
8282
default: '',
8383
},
84+
rowGap: {
85+
stkResponsive: true,
86+
type: 'number',
87+
default: '',
88+
},
8489
}
8590

8691
export const attributes = ( version = VERSION ) => {

src/block/icon-list/style.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ const getStyleParams = options => {
114114
responsive: 'all',
115115
format: '%spx',
116116
},
117+
{
118+
selector: 'li',
119+
styleRule: 'marginBottom',
120+
attrName: 'rowGap',
121+
responsive: 'all',
122+
format: '%spx',
123+
},
117124
{
118125
selector: [ 'ul', 'ol' ],
119126
styleRule: 'paddingLeft',

0 commit comments

Comments
 (0)