From e2f257fbfa5974bdfe17f828084572f57bf5d8ba Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 28 Nov 2022 09:47:35 +0100 Subject: [PATCH 1/2] Remove deprecated APIs from the components package --- packages/components/CHANGELOG.md | 6 ++++ packages/components/src/button/deprecated.js | 32 ----------------- packages/components/src/button/index.js | 11 ------ packages/components/src/index.js | 1 - .../components/src/unit-control/index.tsx | 21 +++-------- .../components/src/unit-control/test/utils.ts | 29 ++------------- packages/components/src/unit-control/utils.ts | 35 ++----------------- 7 files changed, 17 insertions(+), 118 deletions(-) delete mode 100644 packages/components/src/button/deprecated.js diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 22a08c2f0dd08..504ec68a021f5 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -14,6 +14,12 @@ - NumberControl: refactor styles/tests/stories to TypeScript, replace fireEvent with user-event ([#45990](https://github.com/WordPress/gutenberg/pull/45990)). +### Breaking changes + +- Remove the deprecated IconButton component. +- Remove the deprecated unit prop from the UnitControl component. +- Remove the deprecated isDefault prop from the Button component. + ## 22.1.0 (2022-11-16) ### Enhancements diff --git a/packages/components/src/button/deprecated.js b/packages/components/src/button/deprecated.js deleted file mode 100644 index 5f18e0e5eb164..0000000000000 --- a/packages/components/src/button/deprecated.js +++ /dev/null @@ -1,32 +0,0 @@ -// @ts-nocheck -/** - * WordPress dependencies - */ -import deprecated from '@wordpress/deprecated'; -import { forwardRef } from '@wordpress/element'; - -/** - * Internal dependencies - */ -import Button from '../button'; - -function IconButton( { labelPosition, size, tooltip, label, ...props }, ref ) { - deprecated( 'wp.components.IconButton', { - since: '5.4', - alternative: 'wp.components.Button', - version: '6.2', - } ); - - return ( -