From 1480d5c7297ba94b8ce61fbb91448c7a93ae1e17 Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Tue, 10 Dec 2024 19:00:05 -0500 Subject: [PATCH] Fix or ignore eslint issues --- mu-plugins/blocks/modal/src/index.js | 11 +++++++---- mu-plugins/blocks/modal/src/view.js | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mu-plugins/blocks/modal/src/index.js b/mu-plugins/blocks/modal/src/index.js index 88cd7258..f621fbf2 100644 --- a/mu-plugins/blocks/modal/src/index.js +++ b/mu-plugins/blocks/modal/src/index.js @@ -3,16 +3,19 @@ */ import { __ } from '@wordpress/i18n'; import { + // eslint-disable-next-line @wordpress/no-unsafe-wp-apis -- experimental ok. __experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown, - __experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients, - InspectorControls, InnerBlocks, + InspectorControls, RichText, useBlockProps, + // eslint-disable-next-line @wordpress/no-unsafe-wp-apis -- experimental ok. + __experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients, withColors, } from '@wordpress/block-editor'; import { PanelBody, TextControl, ToggleControl } from '@wordpress/components'; import { registerBlockType } from '@wordpress/blocks'; +// eslint-disable-next-line import/no-extraneous-dependencies import { useState } from 'react'; /** @@ -56,10 +59,10 @@ function Edit( { ? `var( --wp--preset--color--${ overlayColor.slug } )` : customOverlayColor, }; - console.log( style ); + const blockProps = useBlockProps( { className: classes, - style, + style: style, } ); return ( diff --git a/mu-plugins/blocks/modal/src/view.js b/mu-plugins/blocks/modal/src/view.js index 5d242653..1514d608 100644 --- a/mu-plugins/blocks/modal/src/view.js +++ b/mu-plugins/blocks/modal/src/view.js @@ -29,7 +29,7 @@ const { actions } = store( 'wporg/modal', { * Close the modal only if the backdrop is clicked. * Ignores clicks inside the modal itself. * - * @param {Event} event + * @param {Event} event */ clickBackdrop: ( event ) => { if ( event.target.classList.contains( 'wporg-modal__modal-backdrop' ) ) {