UNPKG

@appbuckets/react-ui

Version:
18 lines (17 loc) 548 B
import * as React from 'react'; import type { ColorPickerChangeHandler } from '../ColorPicker'; export declare type UseColorPickerValueReturn = [ string, ColorPickerChangeHandler, React.Dispatch<React.SetStateAction<string>> ]; /** * Use this hook to get automatically the color picker value * and the handler function to attach to color picker. * Additionally function to force change will be returned * * @param initialValue */ export declare function useColorPickerValue( initialValue?: string | null ): UseColorPickerValueReturn;