From 988e9401da364236c2dfe0296fe4cd234029ae4b Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Tue, 25 Oct 2022 16:08:43 -0500 Subject: [PATCH] Change the props format to match CONTRIBUTING.md https://github.com/WordPress/gutenberg/blob/a42805e157f6c6933f4ef7cabcfc87fa3af81aea/packages/components/CONTRIBUTING.md#readme-example --- .../components/src/color-palette/README.md | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/packages/components/src/color-palette/README.md b/packages/components/src/color-palette/README.md index ba68bb9dcb3283..78db82c391b90f 100644 --- a/packages/components/src/color-palette/README.md +++ b/packages/components/src/color-palette/README.md @@ -36,54 +36,48 @@ for the `ColorPalette`'s color swatches, by rendering your `ColorPalette` with a The component accepts the following props. -### colors +### `colors`: `( PaletteObject | ColorObject )[]` + Array with the colors to be shown. When displaying multiple color palettes to choose from, the format of the array changes from an array of colors objects, to an array of color palettes. -- Type: `Array` - Required: No - Default: `[]` -### disableCustomColors +### `disableCustomColors`: `boolean` Whether to allow the user to pick a custom color on top of the predefined choices (defined via the `colors` prop). -- Type: `Boolean` - Required: No -- Default: false +- Default: `false` -### enableAlpha +### `enableAlpha`: `boolean` Whether the color picker should display the alpha channel both in the bottom inputs as well as in the color picker itself. -- Type: `Boolean` - Required: No -- Default: false +- Default: `false` -### value +### `value`: `string` currently active value -- Type: `String` - Required: No -### onChange +### `onChange`: `OnColorChange` Callback called when a color is selected. -- Type: `Function` - Required: Yes -### className +### `className`: `string` classes to be applied to the container. -- Type: `String` - Required: No -### clearable +### `clearable`: `boolean` Whether the palette should have a clearing button. -- Type: `Boolean` - Required: No -- Default: true +- Default: `true`