feat(BOOK-469): Enter details design changes with guarantee/non-guarantee flow
Approved-by: Bianca Widstam
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import type { IntlShape } from "react-intl"
|
||||
|
||||
export function getPaymentHeadingConfig(
|
||||
intl: IntlShape,
|
||||
bookingMustBeGuaranteed: boolean,
|
||||
hasOnlyFlexRates: boolean
|
||||
) {
|
||||
if (hasOnlyFlexRates) {
|
||||
return bookingMustBeGuaranteed
|
||||
? {
|
||||
heading: intl.formatMessage({
|
||||
id: "enterDetails.payment.guaranteePaymentHeading",
|
||||
defaultMessage: "Guarantee with card",
|
||||
}),
|
||||
subHeading: intl.formatMessage({
|
||||
id: "enterDetails.payment.guaranteePaymentSubheading",
|
||||
defaultMessage: "(your card won't be charged now)",
|
||||
}),
|
||||
showLearnMore: true,
|
||||
}
|
||||
: {
|
||||
heading: intl.formatMessage({
|
||||
id: "enterDetails.payment.onlyFlexRatesTitle",
|
||||
defaultMessage: "Final step",
|
||||
}),
|
||||
showLearnMore: false,
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
preHeading: intl.formatMessage({
|
||||
id: "enterDetails.payment.label",
|
||||
defaultMessage: "Payment",
|
||||
}),
|
||||
heading: intl.formatMessage({
|
||||
id: "enterDetails.payment.title",
|
||||
defaultMessage: "Select payment method",
|
||||
}),
|
||||
showLearnMore: false,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user