forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BorderBoxControl: Deprecate 36px default size (WordPress#65752)
* Add utility function * BorderBoxControl: Deprecate 36px default size * Fix naming * Add changelog Co-authored-by: mirka <[email protected]> Co-authored-by: ciampo <[email protected]> Co-authored-by: DaniGuardiola <[email protected]>
- Loading branch information
1 parent
f771780
commit 3d11082
Showing
7 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,4 +84,5 @@ Default.args = { | |
colors, | ||
label: 'Borders', | ||
enableStyle: true, | ||
__next40pxDefaultSize: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import deprecated from '@wordpress/deprecated'; | ||
|
||
export function maybeWarnDeprecated36pxSize( { | ||
componentName, | ||
__next40pxDefaultSize, | ||
size, | ||
}: { | ||
componentName: string; | ||
__next40pxDefaultSize: boolean | undefined; | ||
size: string; | ||
} ) { | ||
if ( __next40pxDefaultSize || size !== 'default' ) { | ||
return; | ||
} | ||
|
||
deprecated( `36px default size for wp.components.${ componentName }`, { | ||
since: '6.7', | ||
version: '7.0', | ||
hint: 'Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.', | ||
} ); | ||
} |