Skip to content

Commit 2d07990

Browse files
authored
chore(ui-react-native): Add utility hook for pressable styles (#2921)
1 parent 0b01c29 commit 2d07990

File tree

42 files changed

+582
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+582
-546
lines changed

.changeset/tough-berries-train.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@aws-amplify/ui-react-native': patch
3+
---
4+
5+
chore(ui-react-native): Add utility hook for pressable styles

packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/__snapshots__/ConfirmResetPassword.spec.tsx.snap

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ Array [
217217
style={
218218
Array [
219219
Object {},
220-
null,
221-
null,
220+
undefined,
222221
undefined,
223222
]
224223
}
@@ -356,8 +355,7 @@ Array [
356355
style={
357356
Array [
358357
Object {},
359-
null,
360-
null,
358+
undefined,
361359
undefined,
362360
]
363361
}
@@ -461,17 +459,13 @@ Array [
461459
Array [
462460
Object {
463461
"alignItems": "center",
464-
"backgroundColor": "transparent",
462+
"backgroundColor": "hsl(190, 95%, 30%)",
465463
"borderRadius": 4,
466464
"justifyContent": "center",
467465
"paddingHorizontal": 16,
468466
"paddingVertical": 12,
469467
},
470-
Object {
471-
"backgroundColor": "hsl(190, 95%, 30%)",
472-
},
473-
null,
474-
null,
468+
undefined,
475469
Object {
476470
"marginHorizontal": 16,
477471
"marginVertical": 12,
@@ -514,17 +508,14 @@ Array [
514508
Object {
515509
"alignItems": "center",
516510
"backgroundColor": "transparent",
511+
"borderColor": "hsl(210, 10%, 58%)",
517512
"borderRadius": 4,
513+
"borderWidth": 1,
518514
"justifyContent": "center",
519515
"paddingHorizontal": 16,
520516
"paddingVertical": 12,
521517
},
522-
Object {
523-
"borderColor": "hsl(210, 10%, 58%)",
524-
"borderWidth": 1,
525-
},
526-
null,
527-
null,
518+
undefined,
528519
Object {
529520
"marginHorizontal": 16,
530521
},
@@ -767,8 +758,7 @@ Array [
767758
style={
768759
Array [
769760
Object {},
770-
null,
771-
null,
761+
undefined,
772762
undefined,
773763
]
774764
}
@@ -906,8 +896,7 @@ Array [
906896
style={
907897
Array [
908898
Object {},
909-
null,
910-
null,
899+
undefined,
911900
undefined,
912901
]
913902
}
@@ -958,17 +947,13 @@ Array [
958947
Array [
959948
Object {
960949
"alignItems": "center",
961-
"backgroundColor": "transparent",
950+
"backgroundColor": "hsl(190, 95%, 30%)",
962951
"borderRadius": 4,
963952
"justifyContent": "center",
964953
"paddingHorizontal": 16,
965954
"paddingVertical": 12,
966955
},
967-
Object {
968-
"backgroundColor": "hsl(190, 95%, 30%)",
969-
},
970-
null,
971-
null,
956+
undefined,
972957
Object {
973958
"marginHorizontal": 16,
974959
"marginVertical": 12,
@@ -1011,17 +996,14 @@ Array [
1011996
Object {
1012997
"alignItems": "center",
1013998
"backgroundColor": "transparent",
999+
"borderColor": "hsl(210, 10%, 58%)",
10141000
"borderRadius": 4,
1001+
"borderWidth": 1,
10151002
"justifyContent": "center",
10161003
"paddingHorizontal": 16,
10171004
"paddingVertical": 12,
10181005
},
1019-
Object {
1020-
"borderColor": "hsl(210, 10%, 58%)",
1021-
"borderWidth": 1,
1022-
},
1023-
null,
1024-
null,
1006+
undefined,
10251007
Object {
10261008
"marginHorizontal": 16,
10271009
},

packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,13 @@ Array [
183183
Array [
184184
Object {
185185
"alignItems": "center",
186-
"backgroundColor": "transparent",
186+
"backgroundColor": "hsl(190, 95%, 30%)",
187187
"borderRadius": 4,
188188
"justifyContent": "center",
189189
"paddingHorizontal": 16,
190190
"paddingVertical": 12,
191191
},
192-
Object {
193-
"backgroundColor": "hsl(190, 95%, 30%)",
194-
},
195-
null,
196-
null,
192+
undefined,
197193
Object {
198194
"marginHorizontal": 16,
199195
"marginVertical": 12,
@@ -250,9 +246,7 @@ Array [
250246
"paddingHorizontal": 16,
251247
"paddingVertical": 12,
252248
},
253-
Object {},
254-
null,
255-
null,
249+
undefined,
256250
Object {
257251
"marginVertical": 8,
258252
"minWidth": "50%",
@@ -410,17 +404,13 @@ Array [
410404
Array [
411405
Object {
412406
"alignItems": "center",
413-
"backgroundColor": "transparent",
407+
"backgroundColor": "hsl(190, 95%, 30%)",
414408
"borderRadius": 4,
415409
"justifyContent": "center",
416410
"paddingHorizontal": 16,
417411
"paddingVertical": 12,
418412
},
419-
Object {
420-
"backgroundColor": "hsl(190, 95%, 30%)",
421-
},
422-
null,
423-
null,
413+
undefined,
424414
Object {
425415
"marginHorizontal": 16,
426416
"marginVertical": 12,
@@ -477,9 +467,7 @@ Array [
477467
"paddingHorizontal": 16,
478468
"paddingVertical": 12,
479469
},
480-
Object {},
481-
null,
482-
null,
470+
undefined,
483471
Object {
484472
"marginVertical": 8,
485473
"minWidth": "50%",

packages/react-native/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap

Lines changed: 15 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,13 @@ Array [
6969
Array [
7070
Object {
7171
"alignItems": "center",
72-
"backgroundColor": "transparent",
72+
"backgroundColor": "hsl(190, 95%, 30%)",
7373
"borderRadius": 4,
7474
"justifyContent": "center",
7575
"paddingHorizontal": 16,
7676
"paddingVertical": 12,
7777
},
78-
Object {
79-
"backgroundColor": "hsl(190, 95%, 30%)",
80-
},
81-
null,
82-
null,
78+
undefined,
8379
Object {
8480
"marginHorizontal": 16,
8581
"marginVertical": 12,
@@ -122,17 +118,14 @@ Array [
122118
Object {
123119
"alignItems": "center",
124120
"backgroundColor": "transparent",
121+
"borderColor": "hsl(210, 10%, 58%)",
125122
"borderRadius": 4,
123+
"borderWidth": 1,
126124
"justifyContent": "center",
127125
"paddingHorizontal": 16,
128126
"paddingVertical": 12,
129127
},
130-
Object {
131-
"borderColor": "hsl(210, 10%, 58%)",
132-
"borderWidth": 1,
133-
},
134-
null,
135-
null,
128+
undefined,
136129
Object {
137130
"marginHorizontal": 16,
138131
},
@@ -227,17 +220,13 @@ Array [
227220
Array [
228221
Object {
229222
"alignItems": "center",
230-
"backgroundColor": "transparent",
223+
"backgroundColor": "hsl(190, 95%, 30%)",
231224
"borderRadius": 4,
232225
"justifyContent": "center",
233226
"paddingHorizontal": 16,
234227
"paddingVertical": 12,
235228
},
236-
Object {
237-
"backgroundColor": "hsl(190, 95%, 30%)",
238-
},
239-
null,
240-
null,
229+
undefined,
241230
Object {
242231
"marginHorizontal": 16,
243232
"marginVertical": 12,
@@ -280,17 +269,14 @@ Array [
280269
Object {
281270
"alignItems": "center",
282271
"backgroundColor": "transparent",
272+
"borderColor": "hsl(210, 10%, 58%)",
283273
"borderRadius": 4,
274+
"borderWidth": 1,
284275
"justifyContent": "center",
285276
"paddingHorizontal": 16,
286277
"paddingVertical": 12,
287278
},
288-
Object {
289-
"borderColor": "hsl(210, 10%, 58%)",
290-
"borderWidth": 1,
291-
},
292-
null,
293-
null,
279+
undefined,
294280
Object {
295281
"marginHorizontal": 16,
296282
},
@@ -438,17 +424,13 @@ Array [
438424
Array [
439425
Object {
440426
"alignItems": "center",
441-
"backgroundColor": "transparent",
427+
"backgroundColor": "hsl(190, 95%, 30%)",
442428
"borderRadius": 4,
443429
"justifyContent": "center",
444430
"paddingHorizontal": 16,
445431
"paddingVertical": 12,
446432
},
447-
Object {
448-
"backgroundColor": "hsl(190, 95%, 30%)",
449-
},
450-
null,
451-
null,
433+
undefined,
452434
Object {
453435
"marginHorizontal": 16,
454436
"marginVertical": 12,
@@ -491,17 +473,14 @@ Array [
491473
Object {
492474
"alignItems": "center",
493475
"backgroundColor": "transparent",
476+
"borderColor": "hsl(210, 10%, 58%)",
494477
"borderRadius": 4,
478+
"borderWidth": 1,
495479
"justifyContent": "center",
496480
"paddingHorizontal": 16,
497481
"paddingVertical": 12,
498482
},
499-
Object {
500-
"borderColor": "hsl(210, 10%, 58%)",
501-
"borderWidth": 1,
502-
},
503-
null,
504-
null,
483+
undefined,
505484
Object {
506485
"marginHorizontal": 16,
507486
},

0 commit comments

Comments
 (0)