Skip to content

Commit

Permalink
Update docs to reflect onChange accepting a hex or hex8
Browse files Browse the repository at this point in the history
  • Loading branch information
chad1008 committed Mar 23, 2023
1 parent bc51c8d commit b3d6b61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/color-picker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The current color value to display in the picker. Must be a hex or hex8 string.

### `onChange`: `(hex8Color: string) => void`

Fired when the color changes. Always passes a hex8 color string.
Fired when the color changes. Always passes a hex or hex8 color string.

- Required: No

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/color-picker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export type ColorPickerProps = WordPressComponentProps<
*/
color?: string;
/**
* Fired when the color changes. Always passes a hex8 color string.
* Fired when the color changes. Always passes a hex or hex8 color string.
*/
onChange?: ( hex8Color: string ) => void;
onChange?: ( color: string ) => void;
/**
* An optional default value to use for the color picker.
*/
Expand Down

0 comments on commit b3d6b61

Please sign in to comment.