CheckoutStyle class
CheckoutStyle
class consist of following parameters.
Parameters Optional
Optional
Parameter | Type | Description |
---|---|---|
mode | ReepayCheckoutSheet.Mode | Pre-defined sheet modes |
sheetHeightFraction | Double | Fraction of the sheet height |
sheetBackgroundColor | String | HEX value to apply color on sheet background |
prefersGrabberVisible | Bool | Show the sheet grabber |
hideHeader | Bool | Hide header on Checkout |
hideFooterCancel | Bool | Hide footer cancel button on Checkout |
sheetDismissable | ReepayCheckoutSheet.SheetDismissable | Sheet dismiss behaviour |
dismissAlertStyle | ReepayCheckoutSheet.AlertStyle | Style options for Alert on sheet dismiss attempt |
dismissButtonStyle | ReepayCheckoutSheet.ButtonStyle | Style options for Button on sheet dismiss button |
Example
var checkoutStyle = CheckoutStyle()
checkoutStyle.mode = .customSheet
checkoutStyle.sheetHeightFraction = 0.7
checkoutStyle.hideHeader = true
checkoutStyle.hideFooterCancel = false
checkoutStyle.sheetDismissable = SheetDismissable.withAlertOnChanges
checkoutStyle.dismissAlertStyle = AlertStyle() // Add alert after CheckoutSheet dimiss
checkoutStyle.dismissButtonStyle = ButtonStyle(type: .icon) // Add dismiss button to CheckoutSheet
configuration.checkoutStyle = checkoutStyle // Apply style on CheckoutConfiguration
Updated about 1 month ago
Did this page help you?