Skip to content

Commit 63d0ea9

Browse files
committed
replace deprecated IconButton with Button
1 parent 53d0744 commit 63d0ea9

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/button/edit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { __ } from '@wordpress/i18n';
33
import {
44
Dashicon,
5-
IconButton,
5+
Button,
66
SelectControl,
77
PanelBody,
88
ToggleControl,
@@ -182,7 +182,7 @@ const BootstrapButtonEdit = ( {
182182
setAttributes( { url: value } )
183183
}
184184
/>
185-
<IconButton
185+
<Button
186186
icon="editor-break"
187187
label={ __( 'Apply', 'wp-bootstrap-blocks' ) }
188188
type="submit"

src/row/edit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// WordPress dependencies
22
import { __ } from '@wordpress/i18n';
33
import {
4-
IconButton,
4+
Button,
55
CheckboxControl,
66
PanelBody,
77
SelectControl,
@@ -400,7 +400,7 @@ const BootstrapRowEdit = ( {
400400
className="wp-bootstrap-blocks-template-selector-button"
401401
key={ index }
402402
>
403-
<IconButton
403+
<Button
404404
label={ template.title }
405405
icon={ template.icon }
406406
onClick={ () => {
@@ -416,7 +416,7 @@ const BootstrapRowEdit = ( {
416416
<div className="wp-bootstrap-blocks-template-selector-button-label">
417417
{ template.title }
418418
</div>
419-
</IconButton>
419+
</Button>
420420
</li>
421421
)
422422
) }

src/row/editor.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ body:not(.branch-5-3) [data-type="wp-bootstrap-blocks/row"]:not([data-editor-sta
118118
flex: 0 0 50%;
119119
display: flex;
120120

121-
> .components-icon-button,
122-
> .components-button.has-icon {
121+
> .components-button {
123122
flex-direction: column;
124123
justify-content: center;
124+
align-items: center;
125125
width: 100%;
126126
height: auto;
127127
padding: 8px;
@@ -130,6 +130,8 @@ body:not(.branch-5-3) [data-type="wp-bootstrap-blocks/row"]:not([data-editor-sta
130130
&.has-text svg {
131131
margin-right: 0;
132132
margin-bottom: 4px;
133+
width: 40px;
134+
height: 40px;
133135
}
134136

135137
&.is-active,

0 commit comments

Comments
 (0)