Replace deprecated icon buttons by buttons

[MAILPOET-2610]
This commit is contained in:
Rostislav Wolny
2020-01-22 12:39:14 +01:00
committed by Jack Kitterhing
parent 2d2f52746d
commit ec6b726d7b
2 changed files with 6 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { IconButton, Button } from '@wordpress/components';
import { Button } from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import MailPoet from 'mailpoet';
@@ -22,7 +22,6 @@ export default () => {
<Button
isPrimary
isLarge
isDefault
className="editor-post-publish-button"
data-automation-id="form_save_button"
isBusy={isFormSaving}
@@ -30,12 +29,12 @@ export default () => {
>
{isFormSaving ? `${__('Saving')}` : __('Save')}
</Button>
<IconButton
<Button
icon="admin-generic"
label={MailPoet.I18n.t('formSettings')}
labelPosition="down"
tooltipPosition="down"
onClick={() => toggleSidebar(!sidebarOpened)}
isToggled={sidebarOpened}
isPressed={sidebarOpened}
/>
</div>
</div>

View File

@@ -1,5 +1,5 @@
import React, { useEffect } from 'react';
import { IconButton } from '@wordpress/components';
import { Button } from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import PropTypes from 'prop-types';
@@ -12,7 +12,7 @@ const SidebarHeader = ({ children, closeSidebar }) => (
<>
<div className="components-panel__header edit-post-sidebar-header edit-post-sidebar__panel-tabs">
{ children }
<IconButton
<Button
onClick={closeSidebar}
icon="no-alt"
/>