UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

44 lines (43 loc) 1.46 kB
import React, { Component, MouseEventHandler, MouseEvent, PropsWithChildren } from 'react'; import { ColorRange } from '@kepler.gl/constants'; import { NestedPartial } from '@kepler.gl/types'; declare type CustomPaletteProps = { customPalette: ColorRange; showSketcher?: boolean | number; setCustomPalette: (c: NestedPartial<ColorRange>) => void; onCancel: () => void; onToggleSketcher: (i: boolean | number) => void; onApply: (p: ColorRange, e: MouseEvent) => void; }; declare type DragHandleProps = PropsWithChildren<{ className?: string; listeners?: unknown; }>; export declare const DragHandle: React.ComponentClass<DragHandleProps, any>; declare class CustomPalette extends Component<CustomPaletteProps> { state: { isSorting: boolean; }; root: React.RefObject<HTMLDivElement>; _setColorPaletteUI(colors: string[]): void; _onPickerUpdate: (color: { hex: string; }) => void; _onColorDelete: (index: number) => void; _onColorAdd: () => void; _onSwatchClick: (index: number) => void; _onSwatchClose: () => void; _onApply: MouseEventHandler; _onSortEnd: ({ oldIndex, newIndex }: { oldIndex: any; newIndex: any; }) => void; _onSortStart: () => void; _inputColorHex: (index: number, { target: { value } }: { target: { value: any; }; }) => void; render(): React.JSX.Element; } export default CustomPalette;