Skip to content

Commit 0af91b8

Browse files
author
Mario Aguiar
committed
Large button is always filled
1 parent 1a0a9d5 commit 0af91b8

File tree

1 file changed

+6
-0
lines changed
  • plugin/assets/src/block-editor/blocks/button

1 file changed

+6
-0
lines changed

plugin/assets/src/block-editor/blocks/button/edit.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ const ButtonEdit = ( {
201201
}
202202
}, [ isSubmitButton ] ); // eslint-disable-line
203203

204+
useEffect( () => {
205+
if ( 'large' === size ) {
206+
setAttributes( { elevationStyle: 'filled' } );
207+
}
208+
}, [ size ] ); //eslint-disable-line react-hooks/exhaustive-deps
209+
204210
const colorSettings = {
205211
text: {
206212
label: __( 'Text Color', 'material-design' ),

0 commit comments

Comments
 (0)