Kvaser CanKing GUI Extensions SDK - v7.5.1
    Preparing search index...

    Interface ColorControlProps

    Properties of the ColorControl React component.

    interface ColorControlProps {
        anchorOrigin?: PopoverOrigin;
        color: string;
        onChange: (color: string) => void;
        predefinedColors?: string[];
        size?: string | number;
    }
    Index

    Properties

    anchorOrigin?: PopoverOrigin

    The origin for the popover that contains the color picker. Default is { vertical: 'bottom', horizontal: 'left' }.

    color: string

    The currently selected color in hex string format or a color name (e.g., "#RRGGBB" or "#RRGGBBAA" or "red").

    onChange: (color: string) => void

    A callback that will be called when the user selects a new color.

    Type Declaration

      • (color: string): void
      • Parameters

        • color: string

          The newly selected color in hex string format.

        Returns void

    predefinedColors?: string[]

    Optional predefined colors that the user can select from.

    size?: string | number

    The size of the color button. Default is "24px".