@pnp/spfx-property-controls
Version:
Reusable property pane controls for SharePoint Framework solutions
71 lines • 2.13 kB
TypeScript
import { IPropertyPaneCustomFieldProps } from '@microsoft/sp-property-pane';
import { IColor } from '@fluentui/react';
/**
* Enum for specifying how the control should be shown
*/
export declare enum PropertyFieldColorPickerStyle {
Full = 1,
Inline = 2
}
/**
* Public properties of the PropertyFieldColorPicker custom field
*/
export interface IPropertyFieldColorPickerProps {
/**
* Property field label displayed on top
*/
label: string;
/**
* Defines an onPropertyChange function to raise when the selected value changes.
* Normally this function must be defined with the 'this.onPropertyChange'
* method of the web part object.
*/
onPropertyChange(propertyPath: string, oldValue: any, newValue: any): void;
/**
* The CSS-compatible string to describe the initial color
*/
selectedColor?: string | IColor;
/**
* When true, the alpha slider control is hidden
*/
alphaSliderHidden?: boolean;
/**
* Whether to show color preview box.
*/
showPreview?: boolean;
/**
* Whether the property pane field is enabled or not.
*/
disabled?: boolean;
/**
* Time after which the control is updated
*/
debounce?: number;
/**
* Whether the property pane field is hidden or not.
*/
isHidden?: boolean;
/**
* An UNIQUE key indicates the identity of this control
*/
key: string;
/**
* Parent Web Part properties
*/
properties: any;
/**
* Determines how the control is displayed (defaults to inline)
*/
style?: PropertyFieldColorPickerStyle;
/**
* The name of the UI Fabric Font Icon to use for Inline display (defaults to Color)
*/
iconName?: string;
/**
* When true, the property is returned as an IColor object. When false (default), the property is returned as a CSS-compatible string
*/
valueAsObject?: boolean;
}
export interface IPropertyFieldColorPickerPropsInternal extends IPropertyFieldColorPickerProps, IPropertyPaneCustomFieldProps {
}
//# sourceMappingURL=IPropertyFieldColorPicker.d.ts.map