Skip to content

Commit

Permalink
add JSDoc descriptions for ColorListPickerProps
Browse files Browse the repository at this point in the history
  • Loading branch information
chad1008 committed Jan 9, 2023
1 parent 8204e73 commit f5ae77a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/components/src/color-list-picker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,35 @@
import type { CSSProperties } from 'react';

export type ColorListPickerProps = {
/**
* A list of predifened colors. Each color is an object with a `name` and a
* `color` value.
* The `name` is a string used to identify the color in the UI.
* The `color` is a valid CSS color string.
*/
colors: Array< {
name: string;
color: NonNullable< CSSProperties[ 'color' ] >;
} >;
/**
* A list of labels for each of the options displayed in the UI.
*/
labels: Array< string >;
/**
* An array containing the currently selected colors.
*/
value?: Array< string | undefined >;
/**
* Controls whether the custom color picker is displayed.
*/
disableCustomColors?: boolean;
/**
* Controls whether the ColorPalette should show an alpha channel control.
*/
enableAlpha?: boolean;
/**
* A function that receives the updated color value.
*/
onChange: ( newValue: Array< string | undefined > ) => void;
};

Expand Down

0 comments on commit f5ae77a

Please sign in to comment.