UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

43 lines (42 loc) 1.36 kB
import * as React from 'react'; import { IColorPickerProps, IColorPicker } from './ColorPicker.types'; import { IColor } from '../../utilities/color/interfaces'; declare type IRGBHex = Pick<IColor, 'r' | 'g' | 'b' | 'a' | 'hex'>; export interface IColorPickerState { color: IColor; editingColor?: { component: keyof IRGBHex; value: string; }; } /** * {@docCategory ColorPicker} */ export declare class ColorPickerBase extends React.Component<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; UNSAFE_componentWillReceiveProps(newProps: IColorPickerProps): void; render(): JSX.Element; private _getDisplayValue; private _onSVChanged; private _onHChanged; private _onAChanged; private _onTextChange; private _onBlur; /** * 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; } export {};