import { TouchableHighlight, TouchableOpacity, ViewStyle } from "react-native"; import { Lottie } from "../../../App/common/constants/StringConstant"; import { ButtonState } from "../../../App/common/interface/widgets/widgetData/FooterWithCardWidgetData"; import { LottieFieldData } from "../../../App/common/interface/widgets/widgetData/TitleWidgetData"; import { StyledLottie } from "../../widgets/styled-lottie/StyledLottie"; import styles from "./CtaButtonStyle"; import { Platform } from "react-native"; import { OsTypeConstants } from "../../../App/common/constants/BuildConfigConstants"; const CtaButton = ({ onPress, style, children, state, }: { onPress?: () => void; style?: ViewStyle; children?: React.ReactNode; state?: ButtonState; }) => { const loaderData: LottieFieldData = { url: Lottie.FOOTER_LOADER_URL, loop: true, lottieStyle: styles.loaderLottieStyle, }; return ( {state === ButtonState.LOADING ? ( ) : ( children )} ); }; export default CtaButton;