Skip to content

Commit 696a3a3

Browse files
shimotmkshimotmkmikachan
authored
fix tab color-reset-all-filter (#75606)
Co-authored-by: shimotmk <shimotomoki@git.wordpress.org> Co-authored-by: mikachan <mikachan@git.wordpress.org>
1 parent a315211 commit 696a3a3

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

‎packages/block-library/src/tabs-menu-item/controls.js‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,13 @@ export default function Controls( {
214214
customActiveBackgroundColor: value,
215215
} );
216216
},
217+
resetAllFilter: () => {
218+
setActiveBackgroundColor( undefined );
219+
setAttributes( {
220+
customActiveBackgroundColor: undefined,
221+
} );
222+
},
223+
clearable: true,
217224
},
218225
{
219226
label: __( 'Active text' ),
@@ -225,6 +232,13 @@ export default function Controls( {
225232
customActiveTextColor: value,
226233
} );
227234
},
235+
resetAllFilter: () => {
236+
setActiveTextColor( undefined );
237+
setAttributes( {
238+
customActiveTextColor: undefined,
239+
} );
240+
},
241+
clearable: true,
228242
},
229243
{
230244
label: __( 'Hover background' ),
@@ -237,6 +251,13 @@ export default function Controls( {
237251
customHoverBackgroundColor: value,
238252
} );
239253
},
254+
resetAllFilter: () => {
255+
setHoverBackgroundColor( undefined );
256+
setAttributes( {
257+
customHoverBackgroundColor: undefined,
258+
} );
259+
},
260+
clearable: true,
240261
},
241262
{
242263
label: __( 'Hover text' ),
@@ -248,6 +269,13 @@ export default function Controls( {
248269
customHoverTextColor: value,
249270
} );
250271
},
272+
resetAllFilter: () => {
273+
setHoverTextColor( undefined );
274+
setAttributes( {
275+
customHoverTextColor: undefined,
276+
} );
277+
},
278+
clearable: true,
251279
},
252280
] }
253281
panelId={ clientId }

0 commit comments

Comments
 (0)