UNPKG

pay-sdk-react

Version:

A cross-platform payment SDK for React, supporting Alipay, WeChat Pay, PayPal, Stripe, Payssion, and Airwallex, compatible with H5, PC, and App environments.

146 lines (145 loc) 3.18 kB
.pay-mask { position: fixed; z-index: 1000; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; } .pay-icon { display: inline-block; color: inherit; width: 16px; vertical-align: -2px; stroke: currentColor; } .pay-icon[fill='currentColor'] { fill: currentColor; stroke: none; } .pay-icon[stroke='currentColor'] { stroke: currentColor; fill: none; } .pay-icon[fill='currentColor'][stroke='currentColor'] { fill: currentColor; stroke: currentColor; } .pay-icon-paypal-text { width: 64px; height: 26px; max-width: 72px; max-height: 32px; } .pay-icon-close { width: 18px; height: 18px; } .pay-icon-stripe-text { width: 24px; height: 24px; } .pay-icon-alipay { width: 20px; height: 20px; } .pay-icon-wechat-pay { width: 20px; height: 20px; } .pay-icon-payssion-pay { width: 36px; height: 20px; } .pay-popup { position: fixed; z-index: 1001; } /* Base container for the animated popup body */ .pay-popup-body { position: fixed; display: flex; flex-direction: column; background-color: #ffffff; z-index: 1010; box-sizing: border-box; } /* --- Sizing and Positioning --- */ .pay-popup-body.pay-popup-body-position-bottom { width: 100%; left: 0; bottom: 0; } .pay-popup-body.pay-popup-body-position-top { width: 100%; left: 0; top: 0; } .pay-popup-body.pay-popup-body-position-left { height: 100%; width: 80vw; left: 0; top: 0; } .pay-popup-body.pay-popup-body-position-right { height: 100%; width: 80vw; right: 0; top: 0; } /* --- Round Corners Modifier --- */ .pay-popup-body.pay-popup-body-round.pay-popup-body-position-bottom { border-radius: 16px 16px 0 0; } .pay-popup-body.pay-popup-body-round.pay-popup-body-position-top { border-radius: 0 0 16px 16px; } .pay-popup-body.pay-popup-body-round.pay-popup-body-position-left { border-radius: 0 16px 16px 0; } .pay-popup-body.pay-popup-body-round.pay-popup-body-position-right { border-radius: 16px 0 0 16px; } /* --- Close Icon --- */ .pay-popup-close-icon { position: absolute; z-index: 1; cursor: pointer; padding: 4px; font-size: 18px; line-height: 1; color: #999; } .pay-popup-body.pay-popup-body-position-bottom .pay-popup-close-icon, .pay-popup-body.pay-popup-body-position-left .pay-popup-close-icon { top: 8px; right: 8px; } .pay-popup-body.pay-popup-body-position-top .pay-popup-close-icon { bottom: 8px; right: 8px; } .pay-popup-body.pay-popup-body-position-right .pay-popup-close-icon { top: 8px; left: 8px; } /* --- Content Area --- */ .pay-popup-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; } /* --- Padding adjustment when close icon is visible --- */ .pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-bottom .pay-popup-content, .pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-left .pay-popup-content { padding-top: 40px; } .pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-right .pay-popup-content { padding-top: 40px; } .pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-top .pay-popup-content { padding-bottom: 40px; }