diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 9476850e286eb..3440d431ddf1f 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -32,6 +32,7 @@ ### Internal - `NavigationMenu` updated to ignore `react/exhaustive-deps` eslint rule ([#44090](https://github.com/WordPress/gutenberg/pull/44090)). +- `ColorPalette`: Convert to TypeScript ([#44632](https://github.com/WordPress/gutenberg/pull/44632)). ## 21.0.0 (2022-09-13) diff --git a/packages/components/src/border-control/types.ts b/packages/components/src/border-control/types.ts index 20cef1e4f6be4..a0330de20ee7f 100644 --- a/packages/components/src/border-control/types.ts +++ b/packages/components/src/border-control/types.ts @@ -16,7 +16,7 @@ export type Border = { export type Color = { name: string; - color: CSSProperties[ 'color' ]; + color: NonNullable< CSSProperties[ 'color' ] >; }; export type ColorOrigin = { diff --git a/packages/components/src/circular-option-picker/index.js b/packages/components/src/circular-option-picker/index.js index 6b85a49220374..f41813906fcab 100644 --- a/packages/components/src/circular-option-picker/index.js +++ b/packages/components/src/circular-option-picker/index.js @@ -16,13 +16,14 @@ import Button from '../button'; import Dropdown from '../dropdown'; import Tooltip from '../tooltip'; -function Option( { - className, - isSelected, - selectedIconProps, - tooltipText, - ...additionalProps -} ) { +function Option( props ) { + const { + className, + isSelected, + selectedIconProps, + tooltipText, + ...additionalProps + } = props; const optionButton = (