Files
super-app/App/common/utilities/ScreenPropertiesUtils.ts
Kshitij Pramod Ghongadi 377c2c0b80 NTP-6602 | Feature | Multi Plan For all (#12981)
Co-authored-by: SANDEEP KUMAR <sandeep.ku@navi.com>
Co-authored-by: Somarapu Vamshi <somarapu.vamshi@navi.com>
Co-authored-by: Shivam Goyal <shivam.goyal@navi.com>
Co-authored-by: vedant aggarwal <vedant.aggarwal@navi.com>
Co-authored-by: Mehul Garg <mehul.garg@navi.com>
Co-authored-by: Hardik Chaudhary <hardik.chaudhary@navi.com>
Co-authored-by: Aditya Narayan Malik <aditya.narayan@navi.com>
Co-authored-by: Shaurya Rehan <shaurya.rehan@navi.com>
Co-authored-by: Divyesh Shinde <divyesh.shinde@navi.com>
Co-authored-by: Mohit Rajput <mohit.rajput@navi.com>
Co-authored-by: sharmapoojabalrambhai <sharma.balrambhai@navi.com>
Co-authored-by: Prajjaval Verma <prajjaval.verma@navi.com>
2024-10-21 18:27:59 +00:00

27 lines
668 B
TypeScript

import { ScreenProperties } from "../constants";
import { LineItem } from "../interface/widgets/screenData/ScreenMetaData";
export const extractScreenProperties = (
screenProperties: Array<LineItem> | undefined,
) => {
let animateHeader: boolean = true;
let showHeaderShadow: boolean = false;
screenProperties?.forEach(item => {
switch (item.key) {
case ScreenProperties.ANIMATE_HEADER:
animateHeader = !!item?.value;
break;
case ScreenProperties.SHOW_HEADER_SHADOW:
showHeaderShadow = !!item?.value;
break;
default:
break;
}
});
return {
animateHeader,
showHeaderShadow,
};
};