Commit f352edf 1 parent 7991ada commit f352edf Copy full SHA for f352edf
File tree 4 files changed +24
-1
lines changed
4 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 27
27
.adyen-checkout__open-invoice .adyen-checkout__field--consentCheckbox {
28
28
margin-top : token (spacer-070 );
29
29
}
30
+
31
+ .adyen-checkout__open-invoice {
32
+ & --loading {
33
+ @include index .adyen-checkout__component--loading ;
34
+ }
35
+ }
36
+
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import Field from '../FormFields/Field';
22
22
import FormInstruction from '../FormInstruction' ;
23
23
import { ComponentMethodsRef } from '../UIElement/types' ;
24
24
import useSRPanelForOpenInvoiceErrors from './useSRPanelForOpenInvoiceErrors' ;
25
+ import classNames from 'classnames' ;
25
26
26
27
const consentCBErrorObj : GenericError = {
27
28
isValid : false ,
@@ -111,7 +112,12 @@ export default function OpenInvoice(props: OpenInvoiceProps) {
111
112
setErrors ( prevErrors => ( { ...prevErrors , ...{ consentCheckbox : ! checked ? consentCBErrorObj : null } } ) ) ;
112
113
} ;
113
114
return (
114
- < div className = "adyen-checkout__open-invoice" >
115
+ < div
116
+ className = { classNames ( {
117
+ 'adyen-checkout__open-invoice' : true ,
118
+ 'adyen-checkout__open-invoice--loading' : status === 'loading'
119
+ } ) }
120
+ >
115
121
< FormInstruction />
116
122
117
123
{ activeFieldsets . companyDetails && (
Original file line number Diff line number Diff line change @@ -111,11 +111,17 @@ export abstract class UIElement<P extends UIElementProps = UIElementProps> exten
111
111
return this ;
112
112
}
113
113
114
+ /**
115
+ * elementRef is a ref to the subclass that extends UIElement e.g. Card.tsx
116
+ */
114
117
public setElementStatus ( status : UIElementStatus , props ?: any ) : this {
115
118
this . elementRef ?. setStatus ( status , props ) ;
116
119
return this ;
117
120
}
118
121
122
+ /**
123
+ * componentRef is a ref to the primary component inside that subclass e.g. CardInput.tsx
124
+ */
119
125
public setStatus ( status : UIElementStatus , props ?) : this {
120
126
if ( this . componentRef ?. setStatus ) {
121
127
this . componentRef . setStatus ( status , props ) ;
Original file line number Diff line number Diff line change @@ -140,3 +140,7 @@ $adyen-checkout-media-query-l-min: 1024px;
140
140
padding : 0 ;
141
141
position : absolute ;
142
142
}
143
+
144
+ @mixin adyen-checkout__component--loading {
145
+ pointer-events : none ;
146
+ }
You can’t perform that action at this time.
0 commit comments