UNPKG

react-native-unit-components

Version:

Unit React Native components

25 lines (22 loc) 918 B
import { UNFundAccountPaymentComponentProps } from './UNFundAccountPaymentComponent'; import { LISTENERS } from '../../scripts/html/bodyScript'; export const getFundAccountPaymentParams = (props: UNFundAccountPaymentComponentProps) => { const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : ''; const feeParam = props.fee ? `fee="${props.fee}"` : ''; return ` customer-token="${props.customerToken}" ${accountIdParam} ${feeParam} is-auto-focus="${props.isAutoFocus ?? false}" initial-stage-back-button="${props.initialStageBackButton ?? false}" final-stage-done-button="${props.finalStageDoneButton ?? false}" style="height: 100%" `; }; export const getFundAccountPaymentScript = () => { return ` ${LISTENERS.unitPaymentCreated} ${LISTENERS.unitPaymentInitialStageBackButtonClicked} ${LISTENERS.unitPaymentFinalStageDoneButtonClicked} `; };