Skip to content

Commit

Permalink
Change the props format to match CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kienstra committed Oct 25, 2022
1 parent 29984c0 commit 988e940
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions packages/components/src/color-palette/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

0 comments on commit 988e940

Please sign in to comment.