Skip to content

Commit c952340

Browse files
Remove deprecation warnings from gallery settings
1 parent 26db9ff commit c952340

3 files changed

Lines changed: 35 additions & 7 deletions

File tree

src/js/components/featured-image.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ let FeaturedTransformationsToggle = ( props ) => {
1919
checked={ props.overwrite_featured_transformations }
2020
onChange={ ( value ) => props.setOverwrite( value ) }
2121
className="cloudinary-overwrite-transformations"
22+
__nextHasNoMarginBottom={ true }
2223
/>
2324
) }
2425
</>

src/js/components/video.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const TransformationsToggle = ( props ) => {
7878
onChange={ ( value ) => {
7979
setAttributes( { overwrite_transformations: value } );
8080
} }
81+
__nextHasNoMarginBottom={ true }
8182
/>
8283
</PanelBody>
8384
);

src/js/gallery-block/controls.js

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
181181
onChange={ ( value ) =>
182182
setAttributes( { transition: value } )
183183
}
184+
__next40pxDefaultSize={ true }
185+
__nextHasNoMarginBottom={ true }
184186
/>
185187
</PanelBody>
186188
) }
@@ -195,6 +197,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
195197
onChange={ ( value ) =>
196198
setAttributes( { aspectRatio: value } )
197199
}
200+
__next40pxDefaultSize={ true }
201+
__nextHasNoMarginBottom={ true }
198202
/>
199203
<p>
200204
<div className="cld-ui-title">
@@ -209,7 +213,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
209213
{ RESIZE_CROP.map( ( type ) => (
210214
<Button
211215
key={ type.value + '-look-and-feel' }
212-
isDefault
216+
variant="secondary"
217+
isSecondary
213218
isPressed={
214219
type.value ===
215220
attributes.transformation_crop
@@ -236,6 +241,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
236241
transformation_background: value,
237242
} );
238243
} }
244+
__next40pxDefaultSize={ true }
245+
__nextHasNoMarginBottom={ true }
239246
/>
240247
) }
241248
<p>{ __( 'Navigation', 'cloudinary' ) }</p>
@@ -244,7 +251,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
244251
{ NAVIGATION.map( ( navType ) => (
245252
<Button
246253
key={ navType.value + '-navigation' }
247-
isDefault
254+
variant="secondary"
255+
isSecondary
248256
isPressed={
249257
navType.value === attributes.navigation
250258
}
@@ -266,6 +274,7 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
266274
onChange={ () =>
267275
setAttributes( { zoom: ! attributes.zoom } )
268276
}
277+
__nextHasNoMarginBottom={ true }
269278
/>
270279
{ attributes.zoom && (
271280
<>
@@ -275,7 +284,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
275284
{ ZOOM_TYPE.map( ( item ) => (
276285
<Button
277286
key={ item.value + '-zoom-type' }
278-
isDefault
287+
variant="secondary"
288+
isSecondary
279289
isPressed={
280290
item.value ===
281291
attributes.zoomProps_type
@@ -306,6 +316,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
306316
zoomProps_viewerPosition: value,
307317
} )
308318
}
319+
__next40pxDefaultSize={ true }
320+
__nextHasNoMarginBottom={ true }
309321
/>
310322
) }
311323
{ attributes.zoomProps_type !== 'popup' && (
@@ -321,7 +333,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
321333
item.value +
322334
'-zoom-trigger'
323335
}
324-
isDefault
336+
variant="secondary"
337+
isSecondary
325338
isPressed={
326339
item.value ===
327340
attributes.zoomProps_trigger
@@ -354,7 +367,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
354367
{ CAROUSEL_LOCATION.map( ( item ) => (
355368
<Button
356369
key={ item.value + '-carousel-location' }
357-
isDefault
370+
variant="secondary"
371+
isSecondary
358372
isPressed={
359373
item.value === attributes.carouselLocation
360374
}
@@ -377,14 +391,17 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
377391
}
378392
min={ 0 }
379393
max={ 100 }
394+
__next40pxDefaultSize={ true }
395+
__nextHasNoMarginBottom={ true }
380396
/>
381397
<p>{ __( 'Carousel Style', 'cloudinary' ) }</p>
382398
<p>
383399
<ButtonGroup>
384400
{ CAROUSEL_STYLE.map( ( item ) => (
385401
<Button
386402
key={ item.value + '-carousel-style' }
387-
isDefault
403+
variant="secondary"
404+
isSecondary
388405
isPressed={
389406
item.value === attributes.carouselStyle
390407
}
@@ -411,6 +428,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
411428
}
412429
min={ 5 }
413430
max={ 300 }
431+
__next40pxDefaultSize={ true }
432+
__nextHasNoMarginBottom={ true }
414433
/>
415434
<RangeControl
416435
label={ __( 'Height', 'cloudinary' ) }
@@ -422,6 +441,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
422441
}
423442
min={ 5 }
424443
max={ 300 }
444+
__next40pxDefaultSize={ true }
445+
__nextHasNoMarginBottom={ true }
425446
/>
426447
<p>{ __( 'Navigation Button Shape', 'cloudinary' ) }</p>
427448
{ NAVIGATION_BUTTON_SHAPE.map( ( item ) => (
@@ -447,7 +468,7 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
447468
{ SELECTED_STYLE.map( ( item ) => (
448469
<Button
449470
key={ item.value + '-selected-style' }
450-
isDefault
471+
variant="secondary"
451472
isPressed={
452473
item.value ===
453474
attributes.thumbnailProps_selectedStyle
@@ -479,6 +500,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
479500
value,
480501
} )
481502
}
503+
__next40pxDefaultSize={ true }
504+
__nextHasNoMarginBottom={ true }
482505
/>
483506
<RangeControl
484507
label={ __(
@@ -495,6 +518,8 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
495518
}
496519
min={ 0 }
497520
max={ 10 }
521+
__next40pxDefaultSize={ true }
522+
__nextHasNoMarginBottom={ true }
498523
/>
499524
<p>{ __( 'Media Shape Icon', 'cloudinary' ) }</p>
500525
{ MEDIA_ICON_SHAPE.map( ( item ) => (
@@ -549,6 +574,7 @@ const Controls = ( { attributes, setAttributes, colors } ) => {
549574
) }
550575
value={ customSettingsPreview }
551576
onChange={ onChangeCustomSettings }
577+
__nextHasNoMarginBottom={ true }
552578
/>
553579
</PanelBody>
554580
</>

0 commit comments

Comments
 (0)