chowa
Version:
UI component library based on React
31 lines (30 loc) • 873 B
TypeScript
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { HSB } from './tool';
export interface ColorInputProps {
value: HSB;
onChange: (hsb: HSB) => void;
mode: 'rgb' | 'hex' | 'hsl';
alpha: boolean;
hsbToStr: (hsb: HSB) => string;
}
export interface ColorState {
result: string;
}
declare class ColorInput extends React.PureComponent<ColorInputProps, ColorState> {
private inputEle;
constructor(props: ColorInputProps);
componentDidUpdate(preProps: ColorInputProps): void;
private onInputChangeHandler;
private onBlurHandler;
private onKeyDownHandler;
render(): JSX.Element;
}
export default ColorInput;