@tactics/toddle-styleguide 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.tsx +11 -1
- package/assets/lottie/wave-for-daycares.json +1197 -0
- package/assets/lottie/wave-for-parents.json +1 -0
- package/index.d.ts +2 -1
- package/index.tsx +2 -0
- package/package.json +21 -19
- package/src/components/atoms/animated-wave/animated-wave.component.d.ts +1 -0
- package/src/components/atoms/animated-wave/animated-wave.component.tsx +28 -0
- package/src/components/atoms/animated-wave/animated-wave.preview.tsx +20 -0
- package/src/components/atoms/animated-wave/animated-wave.styles.d.ts +21 -0
- package/src/components/atoms/animated-wave/animated-wave.styles.js +25 -0
- package/src/components/atoms/backdrop/backdrop.component.d.ts +1 -1
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +1113 -191
- package/src/components/atoms/calendar/calendar.component.d.ts +1 -1
- package/src/components/atoms/check-switch/__snapshots__/check-switch.test.js.snap +17 -0
- package/src/components/atoms/check-switch/check-switch.component.d.ts +1 -1
- package/src/components/atoms/footer/__snapshots__/footer.test.js.snap +8 -3
- package/src/components/atoms/footer/footer.component.d.ts +1 -1
- package/src/components/atoms/heading-components/all-caps-heading/__snapshots__/all-caps-heading.test.js.snap +4 -0
- package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.d.ts +1 -1
- package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.tsx +12 -1
- package/src/components/atoms/heading-components/heading1/heading1.component.d.ts +1 -1
- package/src/components/atoms/heading-components/heading1/heading1.component.tsx +9 -1
- package/src/components/atoms/heading-components/heading3/heading3.component.d.ts +1 -1
- package/src/components/atoms/heading-components/heading3/heading3.component.tsx +9 -1
- package/src/components/atoms/heading-components/heading4/heading4.component.d.ts +1 -1
- package/src/components/atoms/heading-components/heading4/heading4.component.tsx +9 -1
- package/src/components/atoms/image-bubble/image-bubble.component.d.ts +1 -1
- package/src/components/atoms/increment-input/__snapshots__/increment-input.test.js.snap +50 -6
- package/src/components/atoms/increment-input/increment-input.component.d.ts +1 -1
- package/src/components/atoms/logo/__snapshots__/logo.test.js.snap +12 -2
- package/src/components/atoms/logo/logo.component.d.ts +1 -1
- package/src/components/atoms/split-container/__snapshots__/split-container.test.js.snap +59 -3
- package/src/components/atoms/split-container/split-container.component.d.ts +1 -1
- package/src/components/atoms/static-wave/static-wave.component.d.ts +8 -0
- package/src/components/atoms/static-wave/static-wave.component.tsx +46 -0
- package/src/components/atoms/static-wave/static-wave.styles.d.ts +14 -0
- package/src/components/atoms/static-wave/static-wave.styles.js +14 -0
- package/src/components/atoms/text-input/text-input.component.d.ts +1 -1
- package/src/components/molecules/avatar/avatar.component.d.ts +1 -1
- package/src/components/molecules/blocked-message/__snapshots__/blocked-message.test.js.snap +8 -3
- package/src/components/molecules/blocked-message/blocked-message.component.d.ts +1 -1
- package/src/components/molecules/button/__snapshots__/button.test.js.snap +80 -7
- package/src/components/molecules/button/button.component.d.ts +1 -1
- package/src/components/molecules/calendar-select/__snapshots__/calendar-select.test.js.snap +75 -9
- package/src/components/molecules/calendar-select/calendar-select.component.d.ts +1 -1
- package/src/components/molecules/cancel-link/__snapshots__/cancel-link.test.js.snap +34 -0
- package/src/components/molecules/cancel-link/cancel-link.component.d.ts +1 -1
- package/src/components/molecules/checkbox/__snapshots__/checkbox.test.js.snap +34 -0
- package/src/components/molecules/checkbox/checkbox.component.d.ts +1 -1
- package/src/components/molecules/contact-role/contact-role.component.d.ts +1 -1
- package/src/components/molecules/date-input/__snapshots__/date-input.test.js.snap +25 -3
- package/src/components/molecules/date-input/date-input.component.d.ts +1 -1
- package/src/components/molecules/day/__snapshots__/day.test.js.snap +34 -0
- package/src/components/molecules/day/day.component.d.ts +1 -1
- package/src/components/molecules/default-select/__snapshots__/default-select.test.js.snap +25 -3
- package/src/components/molecules/default-select/default-select.component.d.ts +1 -1
- package/src/components/molecules/department_logo/department-logo.component.d.ts +1 -1
- package/src/components/molecules/failed-to-send/__snapshots__/failed-bubble.test.js.snap +58 -9
- package/src/components/molecules/failed-to-send/failed-bubble.component.d.ts +1 -1
- package/src/components/molecules/filter-range/filter-range.component.d.ts +1 -1
- package/src/components/molecules/filter-tab/__snapshots__/filter-tab.test.js.snap +85 -0
- package/src/components/molecules/filter-tab/filter-tab.component.d.ts +1 -1
- package/src/components/molecules/info/info.component.d.ts +1 -1
- package/src/components/molecules/language-button/__snapshots__/language-button.test.js.snap +34 -0
- package/src/components/molecules/language-button/language-button.component.d.ts +1 -1
- package/src/components/molecules/message-input/__snapshots__/message-input.test.js.snap +200 -24
- package/src/components/molecules/message-input/message-input.component.d.ts +1 -1
- package/src/components/molecules/more-info-button/__snapshots__/more-info-button.test.js.snap +34 -0
- package/src/components/molecules/more-info-button/more-info-button.component.d.ts +1 -1
- package/src/components/molecules/password-input/__snapshots__/password-input.test.js.snap +93 -12
- package/src/components/molecules/password-input/password-input.component.d.ts +1 -1
- package/src/components/molecules/pill/pill.component.d.ts +1 -1
- package/src/components/molecules/pressable-icon/__snapshots__/pressable-icon.test.js.snap +90 -12
- package/src/components/molecules/pressable-icon/pressable-icon.component.d.ts +1 -1
- package/src/components/molecules/quick-filter/__snapshots__/quick-filter.test.js.snap +136 -0
- package/src/components/molecules/quick-filter/quick-filter.component.d.ts +1 -1
- package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +25 -3
- package/src/components/molecules/search-input/search.component.d.ts +1 -1
- package/src/components/molecules/select-link/__snapshots__/select-link.test.js.snap +17 -0
- package/src/components/molecules/select-link/select-link.component.d.ts +1 -1
- package/src/components/molecules/select-list-item/__snapshots__/select-list-item.test.js.snap +105 -18
- package/src/components/molecules/select-list-item/select-list-item-preview.tsx +1 -1
- package/src/components/molecules/select-list-item/select-list-item.component.d.ts +1 -1
- package/src/components/molecules/select-list-item/select-list-item.component.tsx +6 -1
- package/src/components/molecules/select-picker/__snapshots__/select-picker.test.js.snap +50 -6
- package/src/components/molecules/select-picker/select-picker.component.d.ts +1 -1
- package/src/components/molecules/send-bubble/__snapshots__/send-text-bubble.test.js.snap +300 -36
- package/src/components/molecules/send-bubble/send-text-bubble.component.d.ts +1 -1
- package/src/components/molecules/snackbar/__snapshots__/snackbar.test.js.snap +32 -12
- package/src/components/molecules/snackbar/snackbar.component.d.ts +1 -1
- package/src/components/molecules/swipe/__snapshots__/swipe.test.js.snap +66 -3
- package/src/components/molecules/swipe/swipe.component.d.ts +1 -1
- package/src/components/molecules/tag/__snapshots__/tag.test.js.snap +34 -0
- package/src/components/molecules/tag/tag.component.d.ts +1 -1
- package/src/components/molecules/time-tracker/time-tracker.component.d.ts +1 -1
- package/src/components/molecules/timeline/timeline.component.d.ts +1 -1
- package/src/components/molecules/timestamp/timestamp.component.d.ts +1 -1
- package/src/components/molecules/wave-background/__snapshots__/wave.test.js.snap +175 -0
- package/src/components/molecules/wave-background/wave.component.d.ts +2 -0
- package/src/components/molecules/wave-background/wave.component.tsx +35 -0
- package/src/components/molecules/wave-background/wave.preview.d.ts +1 -0
- package/src/components/molecules/wave-background/wave.preview.tsx +78 -0
- package/src/components/molecules/wave-background/wave.styles.d.ts +13 -0
- package/src/components/molecules/wave-background/wave.styles.js +13 -0
- package/src/components/molecules/wave-background/wave.test.js +25 -0
- package/src/components/molecules/wide-button/__snapshots__/wide-button.test.js.snap +58 -0
- package/src/components/molecules/wide-button/wide-button.component.d.ts +1 -1
- package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +76 -3
- package/src/components/organisms/child-list-item/child-list-item.component.d.ts +1 -1
- package/src/components/organisms/contact-item/__snapshots__/contact-item.test.js.snap +50 -6
- package/src/components/organisms/contact-item/contact-item.component.d.ts +1 -1
- package/src/components/organisms/day-select/day-select.component.d.ts +1 -1
- package/src/components/organisms/loading-indicator/dot.component.d.ts +1 -1
- package/src/components/organisms/loading-indicator/loading-indicator.test.js +1 -0
- package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +52 -6
- package/src/components/organisms/my-child-list-item/my-child-list-item.component.d.ts +1 -1
- package/src/components/organisms/my-child-list-item/my-child-list-item.component.tsx +6 -1
- package/src/components/organisms/my-child-list-item/my-child-list-item.preview.tsx +1 -1
- package/src/components/organisms/text-bubble/__snapshots__/text-bubble.test.js.snap +358 -45
- package/src/components/organisms/text-bubble/text-bubble.component.d.ts +1 -1
- package/src/components/templates/modal/components/fade-panel.component.d.ts +1 -1
- package/src/components/templates/modal/modal.component.d.ts +1 -1
- package/src/components/templates/modal/modal.preview.tsx +1 -1
- package/src/components/templates/popover/components/foreground/foreground.component.d.ts +1 -1
- package/src/components/templates/popover/components/modal/close/close.component.d.ts +1 -1
- package/src/components/templates/popover/components/modal/heading/heading.component.d.ts +1 -1
- package/src/components/templates/popover/components/modal/heading/heading.component.tsx +7 -1
- package/src/components/templates/popover/components/modal/heading/heading.styles.d.ts +4 -0
- package/src/components/templates/popover/components/modal/heading/heading.styles.js +4 -0
- package/src/components/templates/popover/components/modal/modal.component.d.ts +1 -1
- package/src/components/templates/popover/components/modal/scroll-content/scroll-content.component.d.ts +1 -1
- package/src/components/templates/popover/popover.component.d.ts +1 -1
- package/src/context/theme.context.d.ts +3 -0
- package/src/context/theme.context.ts +3 -0
- package/src/gradients/main/main.gradient.d.ts +1 -1
- package/src/icons/__snapshots__/icons.test.js.snap +408 -148
- package/src/theme/provider/parent.theme.d.ts +3 -0
- package/src/theme/provider/parent.theme.ts +3 -0
- package/src/theme/provider/staff-member.theme.d.ts +3 -0
- package/src/theme/provider/staff-member.theme.ts +3 -0
- package/src/types/icontype.type.d.ts +2 -2
- package/src/types/loading-dots.type.d.ts +1 -1
- package/src/types/text-properties.type.d.ts +1 -1
- package/src/utilities/toddle-datetime/types/duration-like.type.d.ts +1 -1
- package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +2 -2
|
@@ -108,6 +108,23 @@ exports[`Test Swipe component should render an swipe component with dots and nav
|
|
|
108
108
|
}
|
|
109
109
|
>
|
|
110
110
|
<View
|
|
111
|
+
accessibilityState={
|
|
112
|
+
{
|
|
113
|
+
"busy": undefined,
|
|
114
|
+
"checked": undefined,
|
|
115
|
+
"disabled": undefined,
|
|
116
|
+
"expanded": undefined,
|
|
117
|
+
"selected": undefined,
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
accessibilityValue={
|
|
121
|
+
{
|
|
122
|
+
"max": undefined,
|
|
123
|
+
"min": undefined,
|
|
124
|
+
"now": undefined,
|
|
125
|
+
"text": undefined,
|
|
126
|
+
}
|
|
127
|
+
}
|
|
111
128
|
accessible={true}
|
|
112
129
|
collapsable={false}
|
|
113
130
|
focusable={true}
|
|
@@ -186,6 +203,23 @@ exports[`Test Swipe component should render an swipe component with dots and nav
|
|
|
186
203
|
}
|
|
187
204
|
>
|
|
188
205
|
<View
|
|
206
|
+
accessibilityState={
|
|
207
|
+
{
|
|
208
|
+
"busy": undefined,
|
|
209
|
+
"checked": undefined,
|
|
210
|
+
"disabled": undefined,
|
|
211
|
+
"expanded": undefined,
|
|
212
|
+
"selected": undefined,
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
accessibilityValue={
|
|
216
|
+
{
|
|
217
|
+
"max": undefined,
|
|
218
|
+
"min": undefined,
|
|
219
|
+
"now": undefined,
|
|
220
|
+
"text": undefined,
|
|
221
|
+
}
|
|
222
|
+
}
|
|
189
223
|
accessible={true}
|
|
190
224
|
collapsable={false}
|
|
191
225
|
focusable={true}
|
|
@@ -324,7 +358,19 @@ exports[`Test Swipe component should render an swipe component with dots and nav
|
|
|
324
358
|
<View
|
|
325
359
|
accessibilityState={
|
|
326
360
|
{
|
|
361
|
+
"busy": undefined,
|
|
362
|
+
"checked": undefined,
|
|
327
363
|
"disabled": false,
|
|
364
|
+
"expanded": undefined,
|
|
365
|
+
"selected": undefined,
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
accessibilityValue={
|
|
369
|
+
{
|
|
370
|
+
"max": undefined,
|
|
371
|
+
"min": undefined,
|
|
372
|
+
"now": undefined,
|
|
373
|
+
"text": undefined,
|
|
328
374
|
}
|
|
329
375
|
}
|
|
330
376
|
accessible={true}
|
|
@@ -348,7 +394,19 @@ exports[`Test Swipe component should render an swipe component with dots and nav
|
|
|
348
394
|
<View
|
|
349
395
|
accessibilityState={
|
|
350
396
|
{
|
|
397
|
+
"busy": undefined,
|
|
398
|
+
"checked": undefined,
|
|
351
399
|
"disabled": false,
|
|
400
|
+
"expanded": undefined,
|
|
401
|
+
"selected": undefined,
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
accessibilityValue={
|
|
405
|
+
{
|
|
406
|
+
"max": undefined,
|
|
407
|
+
"min": undefined,
|
|
408
|
+
"now": undefined,
|
|
409
|
+
"text": undefined,
|
|
352
410
|
}
|
|
353
411
|
}
|
|
354
412
|
accessible={true}
|
|
@@ -370,8 +428,8 @@ exports[`Test Swipe component should render an swipe component with dots and nav
|
|
|
370
428
|
<View>
|
|
371
429
|
<RNSVGSvgView
|
|
372
430
|
align="xMidYMid"
|
|
373
|
-
bbHeight=
|
|
374
|
-
bbWidth=
|
|
431
|
+
bbHeight="24"
|
|
432
|
+
bbWidth="24"
|
|
375
433
|
fill="none"
|
|
376
434
|
focusable={false}
|
|
377
435
|
height={24}
|
|
@@ -413,7 +471,12 @@ exports[`Test Swipe component should render an swipe component with dots and nav
|
|
|
413
471
|
"strokeLinejoin",
|
|
414
472
|
]
|
|
415
473
|
}
|
|
416
|
-
stroke={
|
|
474
|
+
stroke={
|
|
475
|
+
{
|
|
476
|
+
"payload": 4279837036,
|
|
477
|
+
"type": 0,
|
|
478
|
+
}
|
|
479
|
+
}
|
|
417
480
|
strokeLinecap={1}
|
|
418
481
|
strokeLinejoin={1}
|
|
419
482
|
strokeWidth="2"
|
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`test Tag renders Tag correctly (blue, bold grey text) when isSelected is true 1`] = `
|
|
4
4
|
<View
|
|
5
|
+
accessibilityState={
|
|
6
|
+
{
|
|
7
|
+
"busy": undefined,
|
|
8
|
+
"checked": undefined,
|
|
9
|
+
"disabled": undefined,
|
|
10
|
+
"expanded": undefined,
|
|
11
|
+
"selected": undefined,
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
accessibilityValue={
|
|
15
|
+
{
|
|
16
|
+
"max": undefined,
|
|
17
|
+
"min": undefined,
|
|
18
|
+
"now": undefined,
|
|
19
|
+
"text": undefined,
|
|
20
|
+
}
|
|
21
|
+
}
|
|
5
22
|
accessible={true}
|
|
6
23
|
collapsable={false}
|
|
7
24
|
focusable={true}
|
|
@@ -54,6 +71,23 @@ exports[`test Tag renders Tag correctly (blue, bold grey text) when isSelected i
|
|
|
54
71
|
|
|
55
72
|
exports[`test Tag renders Tag correctly (grey, black text) 1`] = `
|
|
56
73
|
<View
|
|
74
|
+
accessibilityState={
|
|
75
|
+
{
|
|
76
|
+
"busy": undefined,
|
|
77
|
+
"checked": undefined,
|
|
78
|
+
"disabled": undefined,
|
|
79
|
+
"expanded": undefined,
|
|
80
|
+
"selected": undefined,
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
accessibilityValue={
|
|
84
|
+
{
|
|
85
|
+
"max": undefined,
|
|
86
|
+
"min": undefined,
|
|
87
|
+
"now": undefined,
|
|
88
|
+
"text": undefined,
|
|
89
|
+
}
|
|
90
|
+
}
|
|
57
91
|
accessible={true}
|
|
58
92
|
collapsable={false}
|
|
59
93
|
focusable={true}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`test wave background should render a wave background 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
{
|
|
7
|
+
"backgroundColor": "#4055A8",
|
|
8
|
+
"height": 1334,
|
|
9
|
+
"position": "absolute",
|
|
10
|
+
"width": 750,
|
|
11
|
+
"zIndex": -1,
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
>
|
|
15
|
+
<View
|
|
16
|
+
style={
|
|
17
|
+
{
|
|
18
|
+
"alignItems": "center",
|
|
19
|
+
"flex": 1,
|
|
20
|
+
"justifyContent": "flex-start",
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
>
|
|
24
|
+
<View
|
|
25
|
+
style={
|
|
26
|
+
{
|
|
27
|
+
"alignItems": "center",
|
|
28
|
+
"position": "absolute",
|
|
29
|
+
"top": "-1%",
|
|
30
|
+
"width": "100%",
|
|
31
|
+
"zIndex": -1,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
>
|
|
35
|
+
<View
|
|
36
|
+
style={
|
|
37
|
+
[
|
|
38
|
+
{
|
|
39
|
+
"aspectRatio": 1,
|
|
40
|
+
},
|
|
41
|
+
undefined,
|
|
42
|
+
{
|
|
43
|
+
"backgroundColor": "#647ACB",
|
|
44
|
+
"width": 814,
|
|
45
|
+
},
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
>
|
|
49
|
+
<View
|
|
50
|
+
cacheComposition={true}
|
|
51
|
+
collapsable={false}
|
|
52
|
+
colorFilters={[]}
|
|
53
|
+
enableMergePathsAndroidForKitKatAndAbove={false}
|
|
54
|
+
forwardedRef={[Function]}
|
|
55
|
+
loop={true}
|
|
56
|
+
onAnimationFinish={[Function]}
|
|
57
|
+
progress={0}
|
|
58
|
+
resizeMode="contain"
|
|
59
|
+
sourceJson="{"nm":"circle_blue","mn":"","layers":[{"ty":0,"nm":"Shape Layer 1","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":true,"td":1,"ao":0,"ks":{"a":{"a":0,"k":[89,89,0],"ix":1},"s":{"a":0,"k":[561.7977528089888,561.7977528089888,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[500.00000000000006,500.00000000000006,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"masksProperties":[{"nm":"Mask 1","mn":"","inv":false,"mode":"a","x":{"a":0,"k":0,"ix":4},"o":{"a":0,"k":100,"ix":3},"pt":{"a":0,"k":{"c":true,"i":[[49.153,0],[0,-49.153],[-49.153,0],[0,49.153]],"o":[[-49.153,0],[0,49.153],[49.153,0],[0,-49.153]],"v":[[89,0],[0,89],[89,178],[178,89]]},"ix":1}}],"w":178,"h":178,"refId":"comp_0","ind":1},{"ty":4,"nm":"Shape Layer 1","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"tt":1,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[561.7977528089888,561.7977528089888,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[494.8314606741573,233.8876404494382,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Rectangle 1","ix":1,"cix":2,"np":2,"it":[{"ty":"rc","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Rect","nm":"Rectangle Path 1","d":1,"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"s":{"a":0,"k":[178,178],"ix":2}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0.92,47.368],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gf","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - G-Fill","nm":"Gradient Fill 2","e":{"a":0,"k":[0,45],"ix":6},"g":{"p":3,"k":{"a":0,"k":[0,0.25098039215686274,0.3333333333333333,0.6588235294117647,0.5,0.25098039215686274,0.3333333333333333,0.6588235294117647,1,0.25098039215686274,0.3333333333333333,0.6588235294117647],"ix":9}},"t":1,"a":{"a":0,"k":0},"h":{"a":0,"k":0},"s":{"a":0,"k":[0,360],"ix":5},"r":1,"o":{"a":0,"k":89,"ix":10}},{"ty":"gf","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - G-Fill","nm":"Gradient Fill 1","e":{"a":0,"k":[75,0],"ix":6},"g":{"p":3,"k":{"a":0,"k":[0,0.25098039215686274,0.3333333333333333,0.6588235294117647,0.5,0.25098039215686274,0.3333333333333333,0.6588235294117647,1,0.25098039215686274,0.3333333333333333,0.6588235294117647],"ix":9}},"t":1,"a":{"a":0,"k":0},"h":{"a":0,"k":0},"s":{"a":0,"k":[-54,0],"ix":5},"r":1,"o":{"a":0,"k":100,"ix":10}}],"ind":2}],"ddd":0,"h":1000,"w":1000,"meta":{"a":"","k":"","d":"","g":"LottieFiles AE 0.1.21","tc":"#000000"},"v":"3.4.1","fr":8,"op":60.0000024438501,"ip":0,"assets":[{"nm":"","mn":"","layers":[{"ty":4,"nm":"wave_2 Outlines","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[178,89,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,89,0],"t":0,"ti":[-29.667,0,0],"to":[29.667,0,0]},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[178,89,0],"t":59.0000024031193}],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 2","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[45.858,9.977],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[45.859,9.977],[13.272,-0.001]],"o":[[0,0],[-0.03,0.007],[0,0],[-45.859,-9.977],[0,0],[0,0],[0,0],[0,0],[-0.031,0.007],[0,0],[-15.288,-3.326],[-26.538,0]],"v":[[0,-22.84],[0,-22.852],[-0.052,-22.84],[-88.423,-22.84],[-178,-22.84],[-178,32.816],[0,32.816],[178,32.816],[178,-22.852],[177.948,-22.84],[89.576,-22.84],[45.971,-27.273]]},"ix":2}},{"ty":"mm","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Filter - Merge","nm":"Merge Paths 1","mm":4},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[178,145.184],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"fl","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.251,0.3333,0.6588],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}}],"ind":1},{"ty":4,"nm":"wave_1 Outlines","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[178,89,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[178,91,0],"t":0,"ti":[29.667,0,0],"to":[-29.667,0,0]},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,91,0],"t":59.0000024031193}],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":50,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 2","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[15.288,-3.326],[0,0],[0.031,0.007],[0,0],[45.858,-9.977],[0,0],[0.031,0.007],[0,0],[0,0],[0,0],[0,0],[26.539,0]],"o":[[-45.857,9.977],[0,0],[0,0],[0,0],[-45.858,9.977],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-13.272,-0.001]],"v":[[88.423,-22.84],[0.051,-22.84],[0,-22.852],[0,-22.84],[-89.576,-22.84],[-177.948,-22.84],[-178,-22.852],[-178,32.816],[0,32.816],[178,32.816],[178,-22.84],[132.029,-27.273]]},"ix":2}},{"ty":"mm","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Filter - Merge","nm":"Merge Paths 1","mm":4},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[178,145.184],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"fl","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.251,0.3333,0.6588],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}}],"ind":2}],"id":"comp_0"}]}"
|
|
60
|
+
speed={1}
|
|
61
|
+
style={
|
|
62
|
+
{
|
|
63
|
+
"aspectRatio": 1,
|
|
64
|
+
"backgroundColor": "#647ACB",
|
|
65
|
+
"height": "100%",
|
|
66
|
+
"width": 814,
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
textFiltersAndroid={[]}
|
|
70
|
+
textFiltersIOS={[]}
|
|
71
|
+
useNativeLooping={false}
|
|
72
|
+
/>
|
|
73
|
+
</View>
|
|
74
|
+
</View>
|
|
75
|
+
<View
|
|
76
|
+
style={
|
|
77
|
+
{
|
|
78
|
+
"backgroundColor": "#4055A8",
|
|
79
|
+
"height": "30%",
|
|
80
|
+
"position": "absolute",
|
|
81
|
+
"top": "38%",
|
|
82
|
+
"width": "100%",
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/>
|
|
86
|
+
</View>
|
|
87
|
+
</View>
|
|
88
|
+
`;
|
|
89
|
+
|
|
90
|
+
exports[`test wave background should render a wave background for android specific we will give some props that it should render 1`] = `
|
|
91
|
+
<View
|
|
92
|
+
style={
|
|
93
|
+
{
|
|
94
|
+
"backgroundColor": "#4055A8",
|
|
95
|
+
"height": 1334,
|
|
96
|
+
"position": "absolute",
|
|
97
|
+
"width": 750,
|
|
98
|
+
"zIndex": -1,
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
>
|
|
102
|
+
<View
|
|
103
|
+
style={
|
|
104
|
+
{
|
|
105
|
+
"alignItems": "center",
|
|
106
|
+
"flex": 1,
|
|
107
|
+
"justifyContent": "flex-start",
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
>
|
|
111
|
+
<View
|
|
112
|
+
style={
|
|
113
|
+
{
|
|
114
|
+
"alignItems": "center",
|
|
115
|
+
"position": "absolute",
|
|
116
|
+
"top": "-1%",
|
|
117
|
+
"width": "100%",
|
|
118
|
+
"zIndex": -1,
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
>
|
|
122
|
+
<View
|
|
123
|
+
style={
|
|
124
|
+
[
|
|
125
|
+
{
|
|
126
|
+
"aspectRatio": 1,
|
|
127
|
+
},
|
|
128
|
+
undefined,
|
|
129
|
+
{
|
|
130
|
+
"backgroundColor": "#647ACB",
|
|
131
|
+
"width": 814,
|
|
132
|
+
},
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
>
|
|
136
|
+
<View
|
|
137
|
+
cacheComposition={true}
|
|
138
|
+
collapsable={false}
|
|
139
|
+
colorFilters={[]}
|
|
140
|
+
enableMergePathsAndroidForKitKatAndAbove={false}
|
|
141
|
+
forwardedRef={[Function]}
|
|
142
|
+
loop={true}
|
|
143
|
+
onAnimationFinish={[Function]}
|
|
144
|
+
progress={0}
|
|
145
|
+
resizeMode="contain"
|
|
146
|
+
sourceJson="{"nm":"circle_blue","mn":"","layers":[{"ty":0,"nm":"Shape Layer 1","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":true,"td":1,"ao":0,"ks":{"a":{"a":0,"k":[89,89,0],"ix":1},"s":{"a":0,"k":[561.7977528089888,561.7977528089888,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[500.00000000000006,500.00000000000006,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"masksProperties":[{"nm":"Mask 1","mn":"","inv":false,"mode":"a","x":{"a":0,"k":0,"ix":4},"o":{"a":0,"k":100,"ix":3},"pt":{"a":0,"k":{"c":true,"i":[[49.153,0],[0,-49.153],[-49.153,0],[0,49.153]],"o":[[-49.153,0],[0,49.153],[49.153,0],[0,-49.153]],"v":[[89,0],[0,89],[89,178],[178,89]]},"ix":1}}],"w":178,"h":178,"refId":"comp_0","ind":1},{"ty":4,"nm":"Shape Layer 1","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"tt":1,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[561.7977528089888,561.7977528089888,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[494.8314606741573,233.8876404494382,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Rectangle 1","ix":1,"cix":2,"np":2,"it":[{"ty":"rc","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Rect","nm":"Rectangle Path 1","d":1,"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"s":{"a":0,"k":[178,178],"ix":2}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[0.92,47.368],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"gf","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - G-Fill","nm":"Gradient Fill 2","e":{"a":0,"k":[0,45],"ix":6},"g":{"p":3,"k":{"a":0,"k":[0,0.25098039215686274,0.3333333333333333,0.6588235294117647,0.5,0.25098039215686274,0.3333333333333333,0.6588235294117647,1,0.25098039215686274,0.3333333333333333,0.6588235294117647],"ix":9}},"t":1,"a":{"a":0,"k":0},"h":{"a":0,"k":0},"s":{"a":0,"k":[0,360],"ix":5},"r":1,"o":{"a":0,"k":89,"ix":10}},{"ty":"gf","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - G-Fill","nm":"Gradient Fill 1","e":{"a":0,"k":[75,0],"ix":6},"g":{"p":3,"k":{"a":0,"k":[0,0.25098039215686274,0.3333333333333333,0.6588235294117647,0.5,0.25098039215686274,0.3333333333333333,0.6588235294117647,1,0.25098039215686274,0.3333333333333333,0.6588235294117647],"ix":9}},"t":1,"a":{"a":0,"k":0},"h":{"a":0,"k":0},"s":{"a":0,"k":[-54,0],"ix":5},"r":1,"o":{"a":0,"k":100,"ix":10}}],"ind":2}],"ddd":0,"h":1000,"w":1000,"meta":{"a":"","k":"","d":"","g":"LottieFiles AE 0.1.21","tc":"#000000"},"v":"3.4.1","fr":8,"op":60.0000024438501,"ip":0,"assets":[{"nm":"","mn":"","layers":[{"ty":4,"nm":"wave_2 Outlines","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[178,89,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,89,0],"t":0,"ti":[-29.667,0,0],"to":[29.667,0,0]},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[178,89,0],"t":59.0000024031193}],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 2","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[45.858,9.977],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[45.859,9.977],[13.272,-0.001]],"o":[[0,0],[-0.03,0.007],[0,0],[-45.859,-9.977],[0,0],[0,0],[0,0],[0,0],[-0.031,0.007],[0,0],[-15.288,-3.326],[-26.538,0]],"v":[[0,-22.84],[0,-22.852],[-0.052,-22.84],[-88.423,-22.84],[-178,-22.84],[-178,32.816],[0,32.816],[178,32.816],[178,-22.852],[177.948,-22.84],[89.576,-22.84],[45.971,-27.273]]},"ix":2}},{"ty":"mm","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Filter - Merge","nm":"Merge Paths 1","mm":4},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[178,145.184],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"fl","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.251,0.3333,0.6588],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}}],"ind":1},{"ty":4,"nm":"wave_1 Outlines","mn":"","sr":1,"st":0,"op":60.0000024438501,"ip":0,"hd":false,"cl":"","ln":"","ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[178,89,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[178,91,0],"t":0,"ti":[29.667,0,0],"to":[-29.667,0,0]},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,91,0],"t":59.0000024031193}],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":50,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Group","nm":"Group 1","ix":1,"cix":2,"np":2,"it":[{"ty":"sh","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Shape - Group","nm":"Path 2","ix":1,"d":1,"ks":{"a":0,"k":{"c":true,"i":[[15.288,-3.326],[0,0],[0.031,0.007],[0,0],[45.858,-9.977],[0,0],[0.031,0.007],[0,0],[0,0],[0,0],[0,0],[26.539,0]],"o":[[-45.857,9.977],[0,0],[0,0],[0,0],[-45.858,9.977],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-13.272,-0.001]],"v":[[88.423,-22.84],[0.051,-22.84],[0,-22.852],[0,-22.84],[-89.576,-22.84],[-177.948,-22.84],[-178,-22.852],[-178,32.816],[0,32.816],[178,32.816],[178,-22.84],[132.029,-27.273]]},"ix":2}},{"ty":"mm","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Filter - Merge","nm":"Merge Paths 1","mm":4},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[178,145.184],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]},{"ty":"fl","bm":0,"cl":"","ln":"","hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[0.251,0.3333,0.6588],"ix":4},"r":1,"o":{"a":0,"k":100,"ix":5}}],"ind":2}],"id":"comp_0"}]}"
|
|
147
|
+
speed={1}
|
|
148
|
+
style={
|
|
149
|
+
{
|
|
150
|
+
"aspectRatio": 1,
|
|
151
|
+
"backgroundColor": "#647ACB",
|
|
152
|
+
"height": "100%",
|
|
153
|
+
"width": 814,
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
textFiltersAndroid={[]}
|
|
157
|
+
textFiltersIOS={[]}
|
|
158
|
+
useNativeLooping={false}
|
|
159
|
+
/>
|
|
160
|
+
</View>
|
|
161
|
+
</View>
|
|
162
|
+
<View
|
|
163
|
+
style={
|
|
164
|
+
{
|
|
165
|
+
"backgroundColor": "#4055A8",
|
|
166
|
+
"height": "30%",
|
|
167
|
+
"position": "absolute",
|
|
168
|
+
"top": "38%",
|
|
169
|
+
"width": "100%",
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/>
|
|
173
|
+
</View>
|
|
174
|
+
</View>
|
|
175
|
+
`;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, {useContext} from 'react';
|
|
2
|
+
import {Dimensions, Platform, View} from 'react-native';
|
|
3
|
+
import {
|
|
4
|
+
StaticWave,
|
|
5
|
+
WaveProps,
|
|
6
|
+
} from '../../atoms/static-wave/static-wave.component';
|
|
7
|
+
import {Stylesheet} from './wave.styles';
|
|
8
|
+
import {ThemeCtx} from '../../../context/theme.context';
|
|
9
|
+
import {AnimatedWave} from '../../atoms/animated-wave/animated-wave.component';
|
|
10
|
+
|
|
11
|
+
export const WaveBackground = ({
|
|
12
|
+
customWavePath,
|
|
13
|
+
customStyle,
|
|
14
|
+
heightSvgContainer,
|
|
15
|
+
positionTop,
|
|
16
|
+
}: WaveProps) => {
|
|
17
|
+
const {width, height} = Dimensions.get('window');
|
|
18
|
+
const context = useContext(ThemeCtx);
|
|
19
|
+
const styles = Stylesheet(context, width, height);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<View style={styles.container}>
|
|
23
|
+
{Platform.OS === 'ios' ? (
|
|
24
|
+
<AnimatedWave />
|
|
25
|
+
) : (
|
|
26
|
+
<StaticWave
|
|
27
|
+
customStyle={customStyle}
|
|
28
|
+
customWavePath={customWavePath}
|
|
29
|
+
heightSvgContainer={heightSvgContainer}
|
|
30
|
+
positionTop={positionTop}
|
|
31
|
+
/>
|
|
32
|
+
)}
|
|
33
|
+
</View>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WaveBackgroundPreview: ({}: {}) => JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React, {useContext, useState} from 'react';
|
|
2
|
+
import {SafeAreaView, View, Platform, StatusBar} from 'react-native';
|
|
3
|
+
import {WaveBackground} from './wave.component';
|
|
4
|
+
import {Logo} from '../../atoms/logo/logo.component';
|
|
5
|
+
import {ThemeCtx} from '../../../context/theme.context';
|
|
6
|
+
import {Heading1, Heading4} from '../../atoms/heading-components';
|
|
7
|
+
import {Paragraph} from '../../atoms/paragraph-components';
|
|
8
|
+
import {SelectPicker} from '../select-picker/select-picker.component';
|
|
9
|
+
|
|
10
|
+
export const WaveBackgroundPreview = ({}: {}) => {
|
|
11
|
+
const regions = [
|
|
12
|
+
{value: 'Leuven', label: 'Leuven'},
|
|
13
|
+
{value: 'Brussel', label: 'Brussel'},
|
|
14
|
+
{value: 'Antwerpen', label: 'Antwerpen'},
|
|
15
|
+
];
|
|
16
|
+
const [selectedRegion, setSelectedRegion] = useState('');
|
|
17
|
+
const Context = useContext(ThemeCtx);
|
|
18
|
+
return (
|
|
19
|
+
<SafeAreaView
|
|
20
|
+
style={{
|
|
21
|
+
flex: 1,
|
|
22
|
+
backgroundColor: Context.colors.main['5'],
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
25
|
+
<WaveBackground />
|
|
26
|
+
<View
|
|
27
|
+
style={{
|
|
28
|
+
width: '100%',
|
|
29
|
+
height: '100%',
|
|
30
|
+
paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight : 0,
|
|
31
|
+
paddingLeft: 16,
|
|
32
|
+
paddingRight: 16,
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
<View
|
|
36
|
+
style={{
|
|
37
|
+
marginTop: 16 * 3.5,
|
|
38
|
+
marginBottom: 16 * 5.5,
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
<Logo big={true} colorIsWhite={true} />
|
|
43
|
+
</View>
|
|
44
|
+
|
|
45
|
+
<View>
|
|
46
|
+
<Heading1
|
|
47
|
+
bold={true}
|
|
48
|
+
textColor={Context.colors.ui.white}
|
|
49
|
+
textAlign={'left'}
|
|
50
|
+
addStyle={{marginBottom: 64}}
|
|
51
|
+
>
|
|
52
|
+
Welkom,
|
|
53
|
+
</Heading1>
|
|
54
|
+
<Heading4
|
|
55
|
+
bold={true}
|
|
56
|
+
textColor={Context.colors.ui.white}
|
|
57
|
+
addStyle={{marginBottom: 8}}
|
|
58
|
+
>
|
|
59
|
+
Regio
|
|
60
|
+
</Heading4>
|
|
61
|
+
<Paragraph
|
|
62
|
+
textColor={Context.colors.ui.white}
|
|
63
|
+
addStyle={{marginBottom: 16}}
|
|
64
|
+
>
|
|
65
|
+
Deze krijgt u toegestuurd van het kinderdagverblijf bij de start van
|
|
66
|
+
uw opvangtraject.
|
|
67
|
+
</Paragraph>
|
|
68
|
+
<SelectPicker
|
|
69
|
+
placeholder={'Choose your region'}
|
|
70
|
+
data={regions}
|
|
71
|
+
onChange={setSelectedRegion}
|
|
72
|
+
defaultValue={selectedRegion}
|
|
73
|
+
/>
|
|
74
|
+
</View>
|
|
75
|
+
</View>
|
|
76
|
+
</SafeAreaView>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {StyleSheet} from 'react-native';
|
|
3
|
+
|
|
4
|
+
export const Stylesheet = (Context, width, height) =>
|
|
5
|
+
StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
width: width,
|
|
8
|
+
height: height,
|
|
9
|
+
backgroundColor: Context.colors.main['3'],
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
zIndex: -1,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import render from 'react-test-renderer';
|
|
3
|
+
import {WaveBackground} from './wave.component';
|
|
4
|
+
|
|
5
|
+
describe('test wave background', () => {
|
|
6
|
+
it('should render a wave background', () => {
|
|
7
|
+
const tree = render.create(<WaveBackground />).toJSON();
|
|
8
|
+
expect(tree).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
it('should render a wave background for android specific we will give some props that it should render', () => {
|
|
11
|
+
const tree = render
|
|
12
|
+
.create(
|
|
13
|
+
<WaveBackground
|
|
14
|
+
customStyle={{flex: 1, alignItems: 'center'}}
|
|
15
|
+
customWavePath={
|
|
16
|
+
'M0,64L48,90.7C96,117,192,171,288,165.3C384,160,480,96,576,80C672,64,768,96,864,138.7C960,181,1056,235,1152,261.3C1248,288,1344,288,1392,288L1440,288L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'
|
|
17
|
+
}
|
|
18
|
+
heightSvgContainer={400}
|
|
19
|
+
positionTop={450}
|
|
20
|
+
/>
|
|
21
|
+
)
|
|
22
|
+
.toJSON();
|
|
23
|
+
expect(tree).toMatchSnapshot();
|
|
24
|
+
});
|
|
25
|
+
});
|