File tree 2 files changed +31
-2
lines changed
demo/peacock/src/pages/checkout
2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 13
13
}
14
14
}
15
15
16
+ .apple-pay {
17
+ background-color : black;
18
+ background-image : -webkit-named-image (apple-pay-logo-white);
19
+ background-size : cover;
20
+ background-origin : content-box;
21
+ background-repeat : no-repeat;
22
+ width : 100% ;
23
+ height : 44px ;
24
+ border-radius : 0 ;
25
+ margin-top : 20px ;
26
+ padding : 10px 0 ;
27
+ }
28
+
16
29
.wrapper {
17
30
display : flex;
18
31
height : 100vh ;
143
156
144
157
.place-order-block {
145
158
margin : 20px 0 ;
146
- height : 58px ;
147
159
}
148
160
149
161
.place-order-button {
150
162
border-radius : 4px ;
151
163
height : 58px ;
152
164
}
153
165
166
+ .apple-pay {
167
+ border-radius : 4px ;
168
+ height : 58px ;
169
+ }
170
+
154
171
.order-summary {
155
172
margin-top : 40px ;
156
173
}
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ import type { CheckoutActions } from './types';
31
31
import type { AsyncStatus } from 'types/async-actions' ;
32
32
33
33
// actions
34
- import * as actions from 'modules/checkout' ;
34
+ import * as actions from 'modules/checkout' ;
35
+ import { checkApplePay } from 'modules/checkout' ;
35
36
import { EditStages } from 'modules/checkout' ;
36
37
import { fetch as fetchCart , hideCart } from 'modules/cart' ;
37
38
import { fetchUser } from 'modules/auth' ;
@@ -181,6 +182,16 @@ class Checkout extends Component {
181
182
return emailIsSet ( user ) ;
182
183
}
183
184
185
+ get applePayButton ( ) {
186
+ if ( ! checkApplePay ( ) ) return null ;
187
+
188
+ return (
189
+ < Button
190
+ styleName = "apple-pay"
191
+ />
192
+ ) ;
193
+ }
194
+
184
195
get orderTotals ( ) {
185
196
const { cart } = this . props ;
186
197
const { billingDone, shippingDone, deliveryDone } = this . state ;
@@ -204,6 +215,7 @@ class Checkout extends Component {
204
215
>
205
216
Place order
206
217
</ Button >
218
+ { this . applePayButton }
207
219
</ div >
208
220
</ div >
209
221
) ;
You can’t perform that action at this time.
0 commit comments