Skip to content

Commit

Permalink
Remove isLarge, it is not used anymore.
Browse files Browse the repository at this point in the history
This should get us rid of warnings such as:

```
Warning: React does not recognize the `isLarge` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `islarge` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
```
  • Loading branch information
jeherve committed Mar 4, 2022
1 parent 5f484f8 commit 7d8ede2
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion projects/plugins/jetpack/extensions/blocks/amazon/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function AmazonEdit( {
label={ __( 'Products', 'jetpack' ) }
onChange={ onChange }
/>
<Button isSecondary isLarge type="submit">
<Button isSecondary type="submit">
{ __( 'Preview', 'jetpack' ) }
</Button>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ function ConversationEdit( {
<div className={ `${ baseClassName }__placeholder` }>
<FormFileUpload
multiple={ false }
isLarge
className="wp-block-jetpack-slideshow__add-item-button"
onChange={ uploadTranscriptFile }
accept={ ACCEPTED_FILE_EXTENSIONS }
Expand Down
4 changes: 2 additions & 2 deletions projects/plugins/jetpack/extensions/blocks/mailchimp/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class MailchimpSubscribeEdit extends Component {
'jetpack'
) }
>
<Button isSecondary isLarge href={ connectURL } target="_blank">
<Button isSecondary href={ connectURL } target="_blank">
{ __( 'Set up Mailchimp form', 'jetpack' ) }
</Button>
<div className={ `${ classPrefix }-recheck` }>
Expand All @@ -162,7 +162,7 @@ class MailchimpSubscribeEdit extends Component {
'jetpack'
) }
>
<Button isSecondary isLarge href={ connectURL }>
<Button isSecondary href={ connectURL }>
{ __( 'Connect to WordPress.com', 'jetpack' ) }
</Button>
</Placeholder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export default function Inspector( props ) {
<Button
// @ts-ignore isSecondary is missing from the type definition
isSecondary={ true }
isLarge={ true }
onClick={
/**
* @param { import('react').MouseEvent<HTMLElement> } e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ export class MembershipsButtonEdit extends Component {
return (
<Button
isPrimary
isLarge
onClick={ () => this.setState( { addingMembershipAmount: PRODUCT_FORM } ) }
>
{ __( 'Add a payment plan', 'jetpack' ) }
Expand Down Expand Up @@ -292,14 +291,12 @@ export class MembershipsButtonEdit extends Component {
<div>
<Button
isPrimary
isLarge
className="membership-button__field-button membership-button__add-amount"
onClick={ this.saveProduct }
>
{ __( 'Add this payment plan', 'jetpack' ) }
</Button>
<Button
isLarge
className="membership-button__field-button"
onClick={ () => this.setState( { addingMembershipAmount: PRODUCT_NOT_ADDING } ) }
>
Expand Down Expand Up @@ -349,7 +346,6 @@ export class MembershipsButtonEdit extends Component {
{ this.state.products.map( product => (
<Button
className="membership-button__field-button"
isLarge
isSecondary
key={ product.id }
onClick={ () => this.setMembershipAmount( product.id ) }
Expand Down Expand Up @@ -386,7 +382,7 @@ export class MembershipsButtonEdit extends Component {
'jetpack'
) }
>
<Button isSecondary isLarge href={ this.state.upgradeURL } target="_blank">
<Button isSecondary href={ this.state.upgradeURL } target="_blank">
{ __( 'Upgrade your plan', 'jetpack' ) }
</Button>
{ this.renderDisclaimer() }
Expand Down
2 changes: 1 addition & 1 deletion projects/plugins/jetpack/extensions/blocks/revue/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function RevueEdit( { attributes, className, setAttributes } ) {
value={ username }
/>
<div>
<Button disabled={ ! username } variant="secondary" isLarge isSecondary type="submit">
<Button disabled={ ! username } variant="secondary" type="submit">
{ __( 'Add Form', 'jetpack' ) }
</Button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default function BlockNudge( {
onClick={ handleClick }
target="_top"
isSecondary
isLarge
>
{ buttonLabel }
</Button>,
Expand Down

0 comments on commit 7d8ede2

Please sign in to comment.