Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recurring Payments: Remove BlockIcon Wrappers #13324

Merged
merged 4 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Payments Block: remove wrapper around icons.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
withNotices,
SelectControl,
} from '@wordpress/components';
import { InspectorControls, InnerBlocks, BlockIcon, BlockControls } from '@wordpress/block-editor';
import { InspectorControls, InnerBlocks, BlockControls } from '@wordpress/block-editor';
import { Component } from '@wordpress/element';
import { applyFilters } from '@wordpress/hooks';

Expand Down Expand Up @@ -378,7 +378,7 @@ export class MembershipsButtonEdit extends Component {
{ ! this.hasUpgradeNudge && this.state.shouldUpgrade && (
<div className="wp-block-jetpack-recurring-payments">
<Placeholder
icon={ <BlockIcon icon={ icon } /> }
icon={ icon }
label={ __( 'Payments', 'jetpack' ) }
notices={ notices }
instructions={ __(
Expand Down Expand Up @@ -406,7 +406,7 @@ export class MembershipsButtonEdit extends Component {
{ ( connected === API_STATE_LOADING ||
this.state.addingMembershipAmount === PRODUCT_FORM_SUBMITTED ) &&
! this.props.attributes.planId && (
<Placeholder icon={ <BlockIcon icon={ icon } /> } notices={ notices }>
<Placeholder icon={ icon } notices={ notices }>
<Spinner />
</Placeholder>
) }
Expand All @@ -415,11 +415,7 @@ export class MembershipsButtonEdit extends Component {
connected === API_STATE_CONNECTED &&
products.length === 0 && (
<div className="wp-block-jetpack-recurring-payments">
<Placeholder
icon={ <BlockIcon icon={ icon } /> }
label={ __( 'Payments', 'jetpack' ) }
notices={ notices }
>
<Placeholder icon={ icon } label={ __( 'Payments', 'jetpack' ) } notices={ notices }>
<div className="components-placeholder__instructions">
<p>
{ __( 'To use this block, first add at least one payment plan.', 'jetpack' ) }
Expand All @@ -436,11 +432,7 @@ export class MembershipsButtonEdit extends Component {
connected === API_STATE_CONNECTED &&
products.length > 0 && (
<div className="wp-block-jetpack-recurring-payments">
<Placeholder
icon={ <BlockIcon icon={ icon } /> }
label={ __( 'Payments', 'jetpack' ) }
notices={ notices }
>
<Placeholder icon={ icon } label={ __( 'Payments', 'jetpack' ) } notices={ notices }>
<div className="components-placeholder__instructions">
<p>
{ __(
Expand Down