Skip to content

Commit

Permalink
ColorListPicker: Tweak types
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Mar 20, 2023
1 parent 77b648c commit 6ee7027
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ function ColorListPicker( {
disableCustomColors={ disableCustomColors }
enableAlpha={ enableAlpha }
onChange={ ( newColor ) => {
const newColors = value.slice();
const newColors: ( string | undefined )[] =
value.slice();
newColors[ index ] = newColor;
onChange( newColors );
} }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type ColorListPickerProps = {
/**
* An array containing the currently selected colors.
*/
value?: Array< string | undefined >;
value?: Array< string >;
/**
* Controls whether the custom color picker is displayed.
*/
Expand Down

0 comments on commit 6ee7027

Please sign in to comment.