@mikezimm/npmfunctions
Version:
Functions used in my SPFx webparts
20 lines (19 loc) • 1.38 kB
TypeScript
import { IMinBannerThemeProps } from '../HelpPanelOnNPM/onNpm/BannerInterface';
import { IConfigurationProp } from '../PropPaneHelp/PreConfigFunctions';
import { IPinMeState } from '../Services/DOM/PinMe/FPSPinMenu';
export declare function doesObjectKeyExistInObjectArray(objArray: any[], key: string, get: 'first' | 'last' | 'all', returnIfNotFound?: any): any;
/**
* This will update bannerStyle and bannerCmdStyle in the following way
* Typically the appPresetCollectionDefaults run before this so it's possible the defBannerTheme is already preset.
* If for some reason the bannerStyle or bannerCmdStyle are not properly set in the Pre-ConfiguredProps, this will udpate them based on the bannerStyleChoice
*
* Then it will adjust bannerCmdStyle fontSize, margins and paddings down so that the PinMe buttons are larger.
* NOTE This may have to be adjusted when PinMe is not activated.
*
* @param thisProps
* @param serverRelativeUrl
* @param bannerStyleChoice
* @returns
*/
export declare function updateBannerThemeStyles(thisProps: IMinBannerThemeProps, bannerStyleChoice: string, forceUpdate: boolean, defPinState: IPinMeState, forcedProps: IConfigurationProp[]): IMinBannerThemeProps;
export declare function refreshBannerStylesOnPropChange(thisProps: IMinBannerThemeProps, propertyPath: string, newValue: string, refreshPane: any): void;