diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 88f9563f0ec58d..c894aa0093bdca 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -35,6 +35,7 @@ - `Context`: updated to ignore `react/exhaustive-deps` eslint rule ([#45044](https://github.com/WordPress/gutenberg/pull/45044)) - `Button`: Refactor Storybook to controls and align docs ([#44105](https://github.com/WordPress/gutenberg/pull/44105)). - `TabPanel`: updated to satisfy `react/exhaustive-deps` eslint rule ([#44935](https://github.com/WordPress/gutenberg/pull/44935)) +- `ColorPalette`: Convert to TypeScript ([#44632](https://github.com/WordPress/gutenberg/pull/44632)). - `UnitControl`: Add tests ([#45260](https://github.com/WordPress/gutenberg/pull/45260)). ## 21.3.0 (2022-10-19) diff --git a/packages/components/src/border-control/types.ts b/packages/components/src/border-control/types.ts index 3ff10dae8ed9b4..9725d90a7f62a6 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 6b85a492203748..f41813906fcaba 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 = (