Skip to content

Commit e668b4a

Browse files
committed
pass props
1 parent 534372e commit e668b4a

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

src/block/carousel/deprecated.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { withVersion } from '~stackable/higher-order'
1010
import { addFilter } from '@wordpress/hooks'
1111
import { semverCompare } from '~stackable/util'
1212

13-
addFilter( 'stackable.carousel.save.slider-props', 'stackable/3.19.0', ( sliderProps, version ) => {
14-
if ( semverCompare( version, '<', '3.19.0' ) ) {
13+
addFilter( 'stackable.carousel.save.slider-props', 'stackable/3.19.0', ( sliderProps, props ) => {
14+
if ( semverCompare( props.version, '<', '3.19.0' ) ) {
1515
return {
1616
...sliderProps,
1717
tabIndex: undefined,

src/block/carousel/save.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const Save = props => {
8282
data-autoplay={ attributes.autoplay ? ( attributes.autoplaySpeed || '4000' ) : undefined }
8383
data-label-slide-of={ attributes.ariaLabelPrev || 'Slide %%d of %%d' }
8484
tabIndex={ 0 }
85-
{ ...applyFilters( 'stackable.carousel.save.slider-props', {}, props.version ) }
85+
{ ...applyFilters( 'stackable.carousel.save.slider-props', {}, props ) }
8686
>
8787
<InnerBlocks.Content />
8888
</div>

src/block/horizontal-scroller/deprecated.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { addFilter } from '@wordpress/hooks'
1010
import compareVersions from 'compare-versions'
1111
import { semverCompare } from '~stackable/util'
1212

13-
addFilter( 'stackable.horizontal-scroller.save.scroller-props', 'stackable/3.19.0', ( scrollerProps, version ) => {
14-
if ( semverCompare( version, '<', '3.19.0' ) ) {
13+
addFilter( 'stackable.horizontal-scroller.save.scroller-props', 'stackable/3.19.0', ( scrollerProps, props ) => {
14+
if ( semverCompare( props.version, '<', '3.19.0' ) ) {
1515
return {
1616
...scrollerProps,
1717
tabIndex: undefined,

src/block/horizontal-scroller/save.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const Save = props => {
5757
<div
5858
className={ contentClassNames }
5959
tabIndex={ 0 }
60-
{ ...applyFilters( 'stackable.horizontal-scroller.save.scroller-props', {}, props.version ) }
60+
{ ...applyFilters( 'stackable.horizontal-scroller.save.scroller-props', {}, props ) }
6161
>
6262
<InnerBlocks.Content />
6363
</div>

src/block/notification/deprecated.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import { semverCompare } from '~stackable/util'
2323
import { __ } from '@wordpress/i18n'
2424
import { addFilter } from '@wordpress/hooks'
2525

26-
addFilter( 'stackable.notification.save.close-button-props', 'stackable/3.19.0', ( buttonProps, version ) => {
27-
if ( semverCompare( version, '<', '3.19.0' ) ) {
26+
addFilter( 'stackable.notification.save.close-button-props', 'stackable/3.19.0', ( buttonProps, props ) => {
27+
if ( semverCompare( props.version, '<', '3.19.0' ) ) {
2828
return {
2929
...buttonProps,
3030
'aria-label': undefined,

src/block/notification/save.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const Save = props => {
8080
<button
8181
className="stk-block-notification__close-button"
8282
aria-label={ __( 'Close', i18n ) }
83-
{ ...applyFilters( 'stackable.notification.save.close-button-props', {}, props.version ) }
83+
{ ...applyFilters( 'stackable.notification.save.close-button-props', {}, props ) }
8484
>
8585
<SVGCloseIcon
8686
width={ attributes.dismissibleSize || 16 }

src/block/progress-bar/deprecated.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { semverCompare } from '~stackable/util'
1111

1212
import { addFilter } from '@wordpress/hooks'
1313

14-
const addAriaLabel = ( divProps, version ) => {
15-
if ( semverCompare( version, '<', '3.19.0' ) ) {
14+
const addAriaLabel = ( divProps, props ) => {
15+
if ( semverCompare( props.version, '<', '3.19.0' ) ) {
1616
return {
1717
...divProps,
1818
'aria-label': undefined,

src/block/progress-bar/save.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const Save = props => {
7777
aria-valuenow={ progressValue }
7878
aria-valuetext={ derivedAriaValue ? striptags( derivedAriaValue ) : undefined }
7979
aria-label={ derivedAriaValue ? striptags( derivedAriaValue ) : undefined }
80-
{ ...applyFilters( 'stackable.progress-bar.div-props', {}, props.version ) }
80+
{ ...applyFilters( 'stackable.progress-bar.div-props', {}, props ) }
8181
>
8282
<div className={ barClassNames }>
8383
{ attributes.showText && (

src/block/progress-circle/deprecated.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { semverCompare } from '~stackable/util'
1111

1212
import { addFilter } from '@wordpress/hooks'
1313

14-
const addAriaLabel = ( divProps, version ) => {
15-
if ( semverCompare( version, '<', '3.19.0' ) ) {
14+
const addAriaLabel = ( divProps, props ) => {
15+
if ( semverCompare( props.version, '<', '3.19.0' ) ) {
1616
return {
1717
...divProps,
1818
'aria-label': undefined,

src/block/progress-circle/save.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const Save = props => {
7373
aria-valuenow={ progressValue }
7474
aria-valuetext={ attributes.progressAriaValueText ? striptags( attributes.progressAriaValueText ) : undefined }
7575
aria-label={ attributes.progressAriaValueText ? striptags( attributes.progressAriaValueText ) : undefined }
76-
{ ...applyFilters( 'stackable.progress-circle.div-props', {}, props.version ) }
76+
{ ...applyFilters( 'stackable.progress-circle.div-props', {}, props ) }
7777
>
7878
<svg>
7979
{ attributes.progressColorType === 'gradient' && (

0 commit comments

Comments
 (0)