File tree 3 files changed +15
-4
lines changed
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 7
7
Style ,
8
8
type ChildType ,
9
9
} from "@krakenjs/jsx-pragmatic/src" ;
10
+ import { getCSPNonce } from "@paypal/sdk-client/src" ;
10
11
import {
11
12
PPLogoExternalImage ,
12
13
PPLogoInlineSVG ,
@@ -271,8 +272,10 @@ export function WalletLabelOld(opts: WalletLabelOptions): ?ChildType {
271
272
) ;
272
273
}
273
274
275
+ const cspNonce = getCSPNonce ( ) ;
276
+
274
277
return (
275
- < Style css = { css } >
278
+ < Style nonce = { cspNonce } css = { css } >
276
279
< div class = "wallet-label" >
277
280
< div class = "paypal-mark" >
278
281
{ __WEB__ ? (
@@ -472,8 +475,10 @@ export function WalletLabel(opts: WalletLabelOptions): ?ChildType {
472
475
attrs [ ATTRIBUTE . PAY_NOW ] = true ;
473
476
}
474
477
478
+ const cspNonce = getCSPNonce ( ) ;
479
+
475
480
return (
476
- < Style css = { css } >
481
+ < Style nonce = { cspNonce } css = { css } >
477
482
< div class = "wallet-label-new" { ...attrs } >
478
483
{ branded ? (
479
484
< div class = "paypal-mark" >
Original file line number Diff line number Diff line change 1
1
/* @flow */
2
2
/** @jsx node */
3
3
import { node , Style , type ChildType } from "@krakenjs/jsx-pragmatic/src" ;
4
+ import { getCSPNonce } from "@paypal/sdk-client/src" ;
4
5
import {
5
6
VenmoLogoExternalImage ,
6
7
VenmoLogoInlineSVG ,
@@ -32,8 +33,10 @@ export function WalletLabel({ ...props }: WalletLabelOptions): ChildType {
32
33
label = instrument . label ;
33
34
}
34
35
36
+ const cspNonce = getCSPNonce ( ) ;
37
+
35
38
return (
36
- < Style css = { css } >
39
+ < Style nonce = { cspNonce } css = { css } >
37
40
< div class = "wallet-label-venmo" >
38
41
< div class = "divider" > |</ div >
39
42
{ logo && (
Original file line number Diff line number Diff line change 7
7
type ChildType ,
8
8
type NullableChildrenType ,
9
9
} from "@krakenjs/jsx-pragmatic/src" ;
10
+ import { getCSPNonce } from "@paypal/sdk-client/src" ;
10
11
11
12
import { CLASS , TEXT_COLOR } from "../../constants" ;
12
13
@@ -49,8 +50,10 @@ export function PlaceHolder({
49
50
chars,
50
51
color = TEXT_COLOR . WHITE ,
51
52
} : PlaceHolderProps ) : ChildType {
53
+ const cspNonce = getCSPNonce ( ) ;
54
+
52
55
return (
53
- < Style css = { css } >
56
+ < Style nonce = { cspNonce } css = { css } >
54
57
< div class = { [ "placeholder" , `color-${ color } ` ] . join ( " " ) } >
55
58
{ new Array ( chars ) . fill ( "x" ) . join ( "" ) }
56
59
</ div >
You can’t perform that action at this time.
0 commit comments