UNPKG

@mikezimm/fps-library-v2

Version:

Library of reusable typescript/javascript functions, interfaces and constants

30 lines 947 B
/** * Use this in the MainWebPart Render to build eleProps object * @param wpProps * @returns */ export function buildFPSTileEleWPProps(wpProps) { const result = { // Only updating width because it is needed to auto-refresh the tile width on props change Image: { src: ``, css: { width: `${wpProps.tileImgWidth}px` } }, Link: { href: '' }, Icon: { name: '' }, }; return result; } /** * Use this in the MainWebPart Render to build eleExtras object * @param wpProps * @returns */ export function buildFPSTileEleWPExtras(wpProps) { const result = { titleWrap: wpProps.tileTitleWrap, tileHighlightColor: wpProps.tileHighlightColor, tileChoice: wpProps.tileChoice, tileLayout: wpProps.tileLayout, tileFileImagePriority: wpProps.tileFileImagePriority, }; return result; } //# sourceMappingURL=packageWPPropsExtras.js.map