office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
34 lines (33 loc) • 1.26 kB
TypeScript
/// <reference types="react" />
import { BaseComponent } from '../../Utilities';
import { IColorPickerProps, IColorPicker } from './ColorPicker.types';
import { IColor } from '../../utilities/color/interfaces';
export interface IColorPickerState {
color: IColor;
}
export declare class ColorPickerBase extends BaseComponent<IColorPickerProps, IColorPickerState> implements IColorPicker {
static defaultProps: {
hexLabel: string;
redLabel: string;
greenLabel: string;
blueLabel: string;
alphaLabel: string;
};
private _textChangeHandlers;
private _textLabels;
constructor(props: IColorPickerProps);
readonly color: IColor;
componentWillReceiveProps(newProps: IColorPickerProps): void;
render(): JSX.Element;
private _getDisplayValue(component);
private _onSVChanged;
private _onHChanged;
private _onAChanged;
private _onTextChange(component, event, newValue?);
/**
* Update the displayed color and call change handlers if appropriate.
* @param ev - Event if call was triggered by an event (undefined if triggered by props change)
* @param newColor - Updated color
*/
private _updateColor(ev, newColor);
}