@tactics/toddle-styleguide 1.2.8 → 1.2.9
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/package.json +1 -1
- package/src/components/atoms/backdrop/backdrop.component.d.ts +4 -7
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +18 -18
- package/src/components/atoms/calendar/calendar.component.d.ts +6 -11
- package/src/components/atoms/check-switch/check-switch.component.d.ts +3 -3
- package/src/components/atoms/footer/footer.component.d.ts +6 -6
- package/src/components/atoms/heading-components/all-caps-heading/all-caps-heading.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading1/heading1.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading2/heading2.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading3/heading3.component.d.ts +2 -10
- package/src/components/atoms/heading-components/heading4/heading4.component.d.ts +2 -10
- package/src/components/atoms/heading-components/index.d.ts +6 -6
- package/src/components/atoms/image-bubble/image-bubble.component.d.ts +6 -9
- package/src/components/atoms/increment-input/increment-input.component.d.ts +4 -8
- package/src/components/atoms/logo/logo.component.d.ts +4 -4
- package/src/components/atoms/paragraph-components/index.d.ts +4 -4
- package/src/components/atoms/paragraph-components/paragraph/paragraph.component.d.ts +2 -10
- package/src/components/atoms/paragraph-components/small-text/small-text.component.d.ts +2 -10
- package/src/components/atoms/paragraph-components/tiny-text/tiny-text.component.d.ts +2 -10
- package/src/components/atoms/quick-message/__snapshots__/quick-message.test.js.snap +72 -1
- package/src/components/atoms/quick-message/quick-message.component.d.ts +5 -8
- package/src/components/atoms/quick-message/quick-message.component.tsx +3 -1
- package/src/components/atoms/quick-message/quick-message.preview.tsx +10 -1
- package/src/components/atoms/quick-message/quick-message.styles.d.ts +13 -13
- package/src/components/atoms/quick-message/quick-message.styles.js +4 -2
- package/src/components/atoms/quick-message/quick-message.test.js +38 -6
- package/src/components/atoms/split-container/split-container.component.d.ts +4 -7
- package/src/components/atoms/static-wave/static-wave.component.d.ts +6 -11
- package/src/components/atoms/text-input/text-input.component.d.ts +6 -10
- package/src/components/atoms/text-input/text-input.component.tsx +6 -9
- package/src/components/atoms/text-input/text-input.preview.d.ts +1 -1
- package/src/components/atoms/text-input/text-input.preview.tsx +3 -3
- package/src/components/atoms/text-input/text-input.styles.d.ts +20 -44
- package/src/components/atoms/text-input/text-input.styles.js +7 -13
- package/src/components/molecules/avatar/avatar.component.d.ts +11 -18
- package/src/components/molecules/blocked-message/blocked-message.component.d.ts +2 -4
- package/src/components/molecules/button/button.component.d.ts +11 -20
- package/src/components/molecules/calendar-select/calendar-select.component.d.ts +7 -12
- package/src/components/molecules/cancel-link/cancel-link.component.d.ts +4 -4
- package/src/components/molecules/checkbox/checkbox.component.d.ts +5 -9
- package/src/components/molecules/contact-role/contact-role.component.d.ts +3 -6
- package/src/components/molecules/date-input/date-input.component.d.ts +4 -7
- package/src/components/molecules/day/day.component.d.ts +6 -6
- package/src/components/molecules/day/day.component.tsx +17 -4
- package/src/components/molecules/day/day.styles.d.ts +27 -44
- package/src/components/molecules/day/day.styles.js +14 -17
- package/src/components/molecules/default-select/default-select.component.d.ts +3 -6
- package/src/components/molecules/department_logo/department-logo.component.d.ts +3 -5
- package/src/components/molecules/failed-to-send/failed-bubble.component.d.ts +6 -11
- package/src/components/molecules/filter-range/filter-range.component.d.ts +7 -14
- package/src/components/molecules/filter-tab/filter-tab.component.d.ts +7 -11
- package/src/components/molecules/info/info.component.d.ts +4 -4
- package/src/components/molecules/language-button/language-button.component.d.ts +4 -8
- package/src/components/molecules/message-input/message-input.component.d.ts +7 -11
- package/src/components/molecules/more-info-button/more-info-button.component.d.ts +4 -8
- package/src/components/molecules/password-input/password-input.component.d.ts +5 -9
- package/src/components/molecules/password-input/password-input.component.tsx +7 -9
- package/src/components/molecules/password-input/password-input.styles.d.ts +27 -26
- package/src/components/molecules/password-input/password-input.styles.js +6 -6
- package/src/components/molecules/pill/pill.component.d.ts +5 -5
- package/src/components/molecules/pressable-icon/pressable-icon.component.d.ts +5 -10
- package/src/components/molecules/quick-filter/quick-filter.component.d.ts +9 -16
- package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +23 -13
- package/src/components/molecules/search-input/search.component.d.ts +9 -16
- package/src/components/molecules/search-input/search.component.tsx +19 -30
- package/src/components/molecules/search-input/search.preview.d.ts +1 -1
- package/src/components/molecules/search-input/search.preview.tsx +8 -6
- package/src/components/molecules/search-input/search.styles.d.ts +31 -30
- package/src/components/molecules/search-input/search.styles.js +14 -8
- package/src/components/molecules/search-input/search.test.js +3 -1
- package/src/components/molecules/select-link/select-link.component.d.ts +4 -4
- package/src/components/molecules/select-list-item/select-list-item.component.d.ts +7 -13
- package/src/components/molecules/select-picker/select-picker.component.d.ts +8 -13
- package/src/components/molecules/send-bubble/send-text-bubble.component.d.ts +10 -17
- package/src/components/molecules/send-bubble/send-text-bubble.component.tsx +1 -5
- package/src/components/molecules/send-bubble/send-text-bubble.styles.d.ts +58 -74
- package/src/components/molecules/send-bubble/send-text-bubble.styles.js +2 -8
- package/src/components/molecules/snackbar/snackbar.component.d.ts +5 -5
- package/src/components/molecules/swipe/swipe.component.d.ts +5 -5
- package/src/components/molecules/tag/tag.component.d.ts +6 -11
- package/src/components/molecules/time-picker/time-picker.component.d.ts +5 -10
- package/src/components/molecules/time-tracker/time-tracker.component.d.ts +6 -10
- package/src/components/molecules/timeline/timeline.component.d.ts +3 -6
- package/src/components/molecules/timeline/timeline.styles.d.ts +40 -50
- package/src/components/molecules/timeline/timeline.styles.js +2 -2
- package/src/components/molecules/timestamp/timestamp.component.d.ts +4 -3
- package/src/components/molecules/timestamp/timestamp.component.tsx +4 -7
- package/src/components/molecules/wave-background/wave.component.d.ts +2 -7
- package/src/components/molecules/wide-button/wide-button.component.d.ts +6 -11
- package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +165 -10
- package/src/components/organisms/child-list-item/child-list-item.component.d.ts +18 -32
- package/src/components/organisms/child-list-item/child-list-item.component.tsx +24 -1
- package/src/components/organisms/child-list-item/child-list-item.preview.tsx +11 -0
- package/src/components/organisms/child-list-item/child-list-item.styles.d.ts +35 -41
- package/src/components/organisms/child-list-item/child-list-item.styles.js +2 -3
- package/src/components/organisms/child-list-item/child-list-item.test.js +9 -4
- package/src/components/organisms/child-list-item/components/child-list-tag.component.d.ts +6 -0
- package/src/components/organisms/child-list-item/components/child-list-tag.component.tsx +28 -0
- package/src/components/organisms/child-list-item/components/child-list-tag.styles.d.ts +10 -0
- package/src/components/organisms/child-list-item/components/child-list-tag.styles.js +16 -0
- package/src/components/organisms/contact-item/contact-item.component.d.ts +6 -11
- package/src/components/organisms/day-select/day-select.component.d.ts +6 -10
- package/src/components/organisms/day-select/day-select.preview.tsx +9 -5
- package/src/components/organisms/loading-indicator/animation-style.animate.d.ts +3 -13
- package/src/components/organisms/loading-indicator/dot.component.d.ts +3 -3
- package/src/components/organisms/loading-indicator/loading-indicator.component.d.ts +2 -9
- package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +143 -399
- package/src/components/organisms/my-child-list-item/my-child-list-item.component.d.ts +9 -18
- package/src/components/organisms/my-child-list-item/my-child-list-item.component.tsx +32 -59
- package/src/components/organisms/my-child-list-item/my-child-list-item.preview.tsx +36 -24
- package/src/components/organisms/my-child-list-item/my-child-list-item.styles.d.ts +32 -28
- package/src/components/organisms/my-child-list-item/my-child-list-item.styles.js +16 -11
- package/src/components/organisms/my-child-list-item/my-child-list-item.test.js +5 -22
- package/src/components/organisms/person-info-card/person-info-card.component.d.ts +10 -18
- package/src/components/organisms/tab-view/tab-view.component.d.ts +8 -12
- package/src/components/organisms/text-bubble/text-bubble.component.d.ts +15 -24
- package/src/components/organisms/text-bubble/text-bubble.component.tsx +3 -1
- package/src/components/organisms/text-bubble/text-bubble.preview.tsx +8 -4
- package/src/components/organisms/text-bubble/text-bubble.styles.d.ts +31 -44
- package/src/components/organisms/text-bubble/text-bubble.styles.js +2 -0
- package/src/components/templates/modal/components/fade-panel.component.d.ts +8 -16
- package/src/components/templates/modal/components/fade-panel.component.tsx +1 -1
- package/src/components/templates/modal/modal.component.d.ts +7 -14
- package/src/components/templates/popover/components/foreground/foreground.component.d.ts +4 -4
- package/src/components/templates/popover/components/modal/close/close.component.d.ts +4 -4
- package/src/components/templates/popover/components/modal/heading/heading.component.d.ts +4 -4
- package/src/components/templates/popover/components/modal/modal.component.d.ts +9 -17
- package/src/components/templates/popover/components/modal/scroll-content/scroll-content.component.d.ts +3 -5
- package/src/components/templates/popover/popover.component.d.ts +8 -15
- package/src/components/templates/popover-action/popover-action.component.d.ts +4 -8
- package/src/context/loading-dots.context.d.ts +6 -9
- package/src/context/theme.context.d.ts +47 -47
- package/src/gradients/main/main.gradient.d.ts +2 -4
- package/src/icons/index.d.ts +2 -7
- package/src/icons/outline/calendar/calendar.icon.d.ts +2 -2
- package/src/icons/outline/chat/chat.icon.d.ts +2 -2
- package/src/icons/outline/chat-alt/chat-alt.icon.d.ts +2 -2
- package/src/icons/outline/check-circle/check-circle.icon.d.ts +2 -5
- package/src/icons/outline/chevron-left/chevron-left.icon.d.ts +2 -5
- package/src/icons/outline/chevron-right/chevron-right.icon.d.ts +2 -5
- package/src/icons/outline/clock/clock.icon.d.ts +2 -2
- package/src/icons/outline/cloud-download/cloud-download.icon.d.ts +2 -5
- package/src/icons/outline/currency-euro/currency-euro.icon.d.ts +2 -5
- package/src/icons/outline/document-text/document-text.icon.d.ts +2 -5
- package/src/icons/outline/exclamation/exclamation.icon.d.ts +2 -5
- package/src/icons/outline/exclamation-circle/exclamation-circle.icon.d.ts +2 -5
- package/src/icons/outline/eye/eye.icon.d.ts +2 -2
- package/src/icons/outline/eye-off/eye-off.icon.d.ts +2 -2
- package/src/icons/outline/filter/filter.icon.d.ts +2 -2
- package/src/icons/outline/information-circle/information-circle.icon.d.ts +2 -5
- package/src/icons/outline/logout/logout.icon.d.ts +2 -2
- package/src/icons/outline/mail/mail.icon.d.ts +2 -2
- package/src/icons/outline/mail-open/mail-open.icon.d.ts +2 -2
- package/src/icons/outline/menu/menu.icon.d.ts +2 -2
- package/src/icons/outline/minus-sm/minus-sm.icon.d.ts +2 -5
- package/src/icons/outline/office-building/office-building.icon.d.ts +2 -5
- package/src/icons/outline/outline.d.ts +2 -6
- package/src/icons/outline/paper-airplane/paper-airplane.icon.d.ts +2 -5
- package/src/icons/outline/paperclip/paperclip.icon.d.ts +2 -5
- package/src/icons/outline/pencil/pencil.icon.d.ts +2 -2
- package/src/icons/outline/phone/phone.icon.d.ts +2 -2
- package/src/icons/outline/plus/plus.icon.d.ts +2 -2
- package/src/icons/outline/plus-sm/plus-sm.icon.d.ts +2 -5
- package/src/icons/outline/qrcode/qrcode.icon.d.ts +2 -2
- package/src/icons/outline/refresh/refresh.icon.d.ts +2 -2
- package/src/icons/outline/search/search.icon.d.ts +2 -2
- package/src/icons/outline/selector/selector.icon.d.ts +2 -2
- package/src/icons/outline/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -5
- package/src/icons/outline/status-online/status-online.icon.d.ts +2 -5
- package/src/icons/outline/thumb-up/thumb-up.icon.d.ts +2 -2
- package/src/icons/outline/trash/trash.icon.d.ts +2 -2
- package/src/icons/outline/user/user.icon.d.ts +2 -2
- package/src/icons/outline/user-group/user-group.icon.d.ts +2 -5
- package/src/icons/outline/users/users.icon.d.ts +2 -2
- package/src/icons/outline/xmark/xmark.icon.d.ts +2 -2
- package/src/icons/solid/calendar/calendar.icon.d.ts +2 -2
- package/src/icons/solid/chat/chat.icon.d.ts +2 -2
- package/src/icons/solid/chat-alt/chat-alt-solid.icon.d.ts +2 -2
- package/src/icons/solid/check-circle/check-circle.icon.d.ts +2 -5
- package/src/icons/solid/chevron-left/chevron-left.icon.d.ts +2 -5
- package/src/icons/solid/chevron-right/chevron-right.icon.d.ts +2 -5
- package/src/icons/solid/clock/clock-solid.icon.d.ts +2 -2
- package/src/icons/solid/cloud-download/cloud-download.icon.d.ts +2 -5
- package/src/icons/solid/currency-euro/currency-euro.icon.d.ts +2 -5
- package/src/icons/solid/document-text/document-text-solid.icon.d.ts +2 -5
- package/src/icons/solid/exclamation/exclamation.icon.d.ts +2 -5
- package/src/icons/solid/exclamation-circle/exclamation-circle.icon.d.ts +2 -5
- package/src/icons/solid/eye/eye.icon.d.ts +2 -2
- package/src/icons/solid/eye-off/eye-off.icon.d.ts +2 -2
- package/src/icons/solid/filter/filter.icon.d.ts +2 -2
- package/src/icons/solid/information-circle/information-circle-solid.icon.d.ts +2 -5
- package/src/icons/solid/logout/logout.icon.d.ts +2 -2
- package/src/icons/solid/mail/mail.icon.d.ts +2 -2
- package/src/icons/solid/mail-open/mail-open.icon.d.ts +2 -2
- package/src/icons/solid/menu/menu.icon.d.ts +2 -2
- package/src/icons/solid/minus-sm/minus-sm.icon.d.ts +2 -5
- package/src/icons/solid/office-building/office-building.icon.d.ts +2 -5
- package/src/icons/solid/paper-airplane/paper-airplane.icon.d.ts +2 -5
- package/src/icons/solid/paperclip/paperclip.icon.d.ts +2 -5
- package/src/icons/solid/pencil/pencil-solid.icon.d.ts +2 -2
- package/src/icons/solid/phone/phone-solid.icon.d.ts +2 -2
- package/src/icons/solid/plus/plus.icon.d.ts +2 -2
- package/src/icons/solid/plus-sm/plus-sm.icon.d.ts +2 -5
- package/src/icons/solid/qrcode/qrcode.icon.d.ts +2 -2
- package/src/icons/solid/refresh/refresh-solid.icon.d.ts +2 -2
- package/src/icons/solid/search/search.icon.d.ts +2 -2
- package/src/icons/solid/selector/selector.icon.d.ts +2 -2
- package/src/icons/solid/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -5
- package/src/icons/solid/solid.d.ts +2 -6
- package/src/icons/solid/status-online/status-online-solid.icon.d.ts +2 -5
- package/src/icons/solid/thumb-up/thumb-up.icon.d.ts +2 -2
- package/src/icons/solid/trash/trash-solid.icon.d.ts +2 -2
- package/src/icons/solid/user/user.icon.d.ts +2 -2
- package/src/icons/solid/user-group/user-group.icon.d.ts +2 -5
- package/src/icons/solid/users/users-solid.icon.d.ts +2 -2
- package/src/icons/solid/xmark/xmark.icon.d.ts +2 -2
- package/src/interfaces/icon.interface.d.ts +5 -5
- package/src/models/hex-color.model.d.ts +4 -4
- package/src/models/initials.model.d.ts +5 -5
- package/src/theme/font/font.d.ts +70 -70
- package/src/theme/font/index.d.ts +3 -3
- package/src/theme/provider/index.d.ts +3 -3
- package/src/theme/provider/parent.theme.d.ts +45 -45
- package/src/theme/provider/staff-member.theme.d.ts +45 -45
- package/src/theme/responsive/index.d.ts +2 -5
- package/src/theme/scale/index.d.ts +10 -10
- package/src/types/bubble-alignment.enum.d.ts +2 -2
- package/src/types/icontype.type.d.ts +1 -41
- package/src/types/keyboard-types.enum.d.ts +7 -7
- package/src/types/loading-dots.type.d.ts +6 -6
- package/src/types/size.enum.d.ts +3 -3
- package/src/types/text-properties.type.d.ts +8 -8
- package/src/types/visual-state.enum.d.ts +5 -5
- package/src/utilities/color-handler/color-handler.d.ts +2 -6
- package/src/utilities/toddle-datetime/interfaces/duration.interface.d.ts +18 -18
- package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +18 -14
- package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.tsx +6 -0
- package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +48 -92
- package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +31 -2
- package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +114 -84
- package/src/utilities/toddle-datetime/types/duration.type.d.ts +4 -0
- package/src/utilities/toddle-datetime/types/{duration-like.type.tsx → duration.type.tsx} +3 -0
- package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +3 -11
- package/src/utilities/toddle-datetime/types/toddle-datetime.type.tsx +8 -1
- package/src/utilities/toddle-datetime/types/duration-like.type.d.ts +0 -2
|
@@ -5,9 +5,9 @@ exports[`test child list item component arrow appears when selectable is false 1
|
|
|
5
5
|
style={
|
|
6
6
|
{
|
|
7
7
|
"backgroundColor": "#FFFFFF",
|
|
8
|
-
"borderBottomLeftRadius":
|
|
8
|
+
"borderBottomLeftRadius": 32,
|
|
9
9
|
"borderBottomRightRadius": 24,
|
|
10
|
-
"borderTopLeftRadius":
|
|
10
|
+
"borderTopLeftRadius": 32,
|
|
11
11
|
"borderTopRightRadius": 24,
|
|
12
12
|
"flexDirection": "row",
|
|
13
13
|
"width": "100%",
|
|
@@ -46,7 +46,6 @@ exports[`test child list item component arrow appears when selectable is false 1
|
|
|
46
46
|
onStartShouldSetResponder={[Function]}
|
|
47
47
|
style={
|
|
48
48
|
{
|
|
49
|
-
"alignItems": "center",
|
|
50
49
|
"borderBottomLeftRadius": 48,
|
|
51
50
|
"borderBottomRightRadius": 24,
|
|
52
51
|
"borderTopLeftRadius": 48,
|
|
@@ -239,6 +238,85 @@ exports[`test child list item component arrow appears when selectable is false 1
|
|
|
239
238
|
De Teddybeertjes
|
|
240
239
|
</Text>
|
|
241
240
|
</View>
|
|
241
|
+
<View
|
|
242
|
+
style={
|
|
243
|
+
{
|
|
244
|
+
"flexDirection": "row",
|
|
245
|
+
"flexWrap": "wrap",
|
|
246
|
+
"gap": 6,
|
|
247
|
+
"marginTop": 10,
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
>
|
|
251
|
+
<View
|
|
252
|
+
style={
|
|
253
|
+
{
|
|
254
|
+
"backgroundColor": "#E5E8EB",
|
|
255
|
+
"borderRadius": 50,
|
|
256
|
+
"paddingBottom": 4,
|
|
257
|
+
"paddingLeft": 12,
|
|
258
|
+
"paddingRight": 12,
|
|
259
|
+
"paddingTop": 4,
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
>
|
|
263
|
+
<Text
|
|
264
|
+
style={
|
|
265
|
+
[
|
|
266
|
+
[
|
|
267
|
+
{
|
|
268
|
+
"fontFamily": "Montserrat",
|
|
269
|
+
"fontSize": 11,
|
|
270
|
+
"lineHeight": 17.9,
|
|
271
|
+
},
|
|
272
|
+
],
|
|
273
|
+
{
|
|
274
|
+
"color": "#515F6C",
|
|
275
|
+
"textAlign": "center",
|
|
276
|
+
"width": "100%",
|
|
277
|
+
},
|
|
278
|
+
undefined,
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
>
|
|
282
|
+
tag1
|
|
283
|
+
</Text>
|
|
284
|
+
</View>
|
|
285
|
+
<View
|
|
286
|
+
style={
|
|
287
|
+
{
|
|
288
|
+
"backgroundColor": "#E5E8EB",
|
|
289
|
+
"borderRadius": 50,
|
|
290
|
+
"paddingBottom": 4,
|
|
291
|
+
"paddingLeft": 12,
|
|
292
|
+
"paddingRight": 12,
|
|
293
|
+
"paddingTop": 4,
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
>
|
|
297
|
+
<Text
|
|
298
|
+
style={
|
|
299
|
+
[
|
|
300
|
+
[
|
|
301
|
+
{
|
|
302
|
+
"fontFamily": "Montserrat",
|
|
303
|
+
"fontSize": 11,
|
|
304
|
+
"lineHeight": 17.9,
|
|
305
|
+
},
|
|
306
|
+
],
|
|
307
|
+
{
|
|
308
|
+
"color": "#515F6C",
|
|
309
|
+
"textAlign": "center",
|
|
310
|
+
"width": "100%",
|
|
311
|
+
},
|
|
312
|
+
undefined,
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
>
|
|
316
|
+
tag2
|
|
317
|
+
</Text>
|
|
318
|
+
</View>
|
|
319
|
+
</View>
|
|
242
320
|
</View>
|
|
243
321
|
</View>
|
|
244
322
|
<View
|
|
@@ -348,9 +426,9 @@ exports[`test child list item component background is blue and text is white whe
|
|
|
348
426
|
style={
|
|
349
427
|
{
|
|
350
428
|
"backgroundColor": "#7B93DB",
|
|
351
|
-
"borderBottomLeftRadius":
|
|
429
|
+
"borderBottomLeftRadius": 32,
|
|
352
430
|
"borderBottomRightRadius": 24,
|
|
353
|
-
"borderTopLeftRadius":
|
|
431
|
+
"borderTopLeftRadius": 32,
|
|
354
432
|
"borderTopRightRadius": 24,
|
|
355
433
|
"flexDirection": "row",
|
|
356
434
|
"width": "100%",
|
|
@@ -389,7 +467,6 @@ exports[`test child list item component background is blue and text is white whe
|
|
|
389
467
|
onStartShouldSetResponder={[Function]}
|
|
390
468
|
style={
|
|
391
469
|
{
|
|
392
|
-
"alignItems": "center",
|
|
393
470
|
"borderBottomLeftRadius": 48,
|
|
394
471
|
"borderBottomRightRadius": 24,
|
|
395
472
|
"borderTopLeftRadius": 48,
|
|
@@ -587,14 +664,14 @@ exports[`test child list item component background is blue and text is white whe
|
|
|
587
664
|
</View>
|
|
588
665
|
`;
|
|
589
666
|
|
|
590
|
-
exports[`test child list item component make text that is too long end in ... 1`] = `
|
|
667
|
+
exports[`test child list item component make text that is too long end in ... and has tags 1`] = `
|
|
591
668
|
<View
|
|
592
669
|
style={
|
|
593
670
|
{
|
|
594
671
|
"backgroundColor": "#FFFFFF",
|
|
595
|
-
"borderBottomLeftRadius":
|
|
672
|
+
"borderBottomLeftRadius": 32,
|
|
596
673
|
"borderBottomRightRadius": 24,
|
|
597
|
-
"borderTopLeftRadius":
|
|
674
|
+
"borderTopLeftRadius": 32,
|
|
598
675
|
"borderTopRightRadius": 24,
|
|
599
676
|
"flexDirection": "row",
|
|
600
677
|
"width": "100%",
|
|
@@ -633,7 +710,6 @@ exports[`test child list item component make text that is too long end in ... 1`
|
|
|
633
710
|
onStartShouldSetResponder={[Function]}
|
|
634
711
|
style={
|
|
635
712
|
{
|
|
636
|
-
"alignItems": "center",
|
|
637
713
|
"borderBottomLeftRadius": 48,
|
|
638
714
|
"borderBottomRightRadius": 24,
|
|
639
715
|
"borderTopLeftRadius": 48,
|
|
@@ -826,6 +902,85 @@ exports[`test child list item component make text that is too long end in ... 1`
|
|
|
826
902
|
De Teddybeertjes
|
|
827
903
|
</Text>
|
|
828
904
|
</View>
|
|
905
|
+
<View
|
|
906
|
+
style={
|
|
907
|
+
{
|
|
908
|
+
"flexDirection": "row",
|
|
909
|
+
"flexWrap": "wrap",
|
|
910
|
+
"gap": 6,
|
|
911
|
+
"marginTop": 10,
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
>
|
|
915
|
+
<View
|
|
916
|
+
style={
|
|
917
|
+
{
|
|
918
|
+
"backgroundColor": "#E5E8EB",
|
|
919
|
+
"borderRadius": 50,
|
|
920
|
+
"paddingBottom": 4,
|
|
921
|
+
"paddingLeft": 12,
|
|
922
|
+
"paddingRight": 12,
|
|
923
|
+
"paddingTop": 4,
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
>
|
|
927
|
+
<Text
|
|
928
|
+
style={
|
|
929
|
+
[
|
|
930
|
+
[
|
|
931
|
+
{
|
|
932
|
+
"fontFamily": "Montserrat",
|
|
933
|
+
"fontSize": 11,
|
|
934
|
+
"lineHeight": 17.9,
|
|
935
|
+
},
|
|
936
|
+
],
|
|
937
|
+
{
|
|
938
|
+
"color": "#515F6C",
|
|
939
|
+
"textAlign": "center",
|
|
940
|
+
"width": "100%",
|
|
941
|
+
},
|
|
942
|
+
undefined,
|
|
943
|
+
]
|
|
944
|
+
}
|
|
945
|
+
>
|
|
946
|
+
tag1
|
|
947
|
+
</Text>
|
|
948
|
+
</View>
|
|
949
|
+
<View
|
|
950
|
+
style={
|
|
951
|
+
{
|
|
952
|
+
"backgroundColor": "#E5E8EB",
|
|
953
|
+
"borderRadius": 50,
|
|
954
|
+
"paddingBottom": 4,
|
|
955
|
+
"paddingLeft": 12,
|
|
956
|
+
"paddingRight": 12,
|
|
957
|
+
"paddingTop": 4,
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
>
|
|
961
|
+
<Text
|
|
962
|
+
style={
|
|
963
|
+
[
|
|
964
|
+
[
|
|
965
|
+
{
|
|
966
|
+
"fontFamily": "Montserrat",
|
|
967
|
+
"fontSize": 11,
|
|
968
|
+
"lineHeight": 17.9,
|
|
969
|
+
},
|
|
970
|
+
],
|
|
971
|
+
{
|
|
972
|
+
"color": "#515F6C",
|
|
973
|
+
"textAlign": "center",
|
|
974
|
+
"width": "100%",
|
|
975
|
+
},
|
|
976
|
+
undefined,
|
|
977
|
+
]
|
|
978
|
+
}
|
|
979
|
+
>
|
|
980
|
+
tag2
|
|
981
|
+
</Text>
|
|
982
|
+
</View>
|
|
983
|
+
</View>
|
|
829
984
|
</View>
|
|
830
985
|
</View>
|
|
831
986
|
</View>
|
|
@@ -1,35 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {ImageSourcePropType} from 'react-native';
|
|
3
|
-
import {Initials} from '../../../models/initials.model';
|
|
4
|
-
import {VisualState} from '../../../types/visual-state.enum';
|
|
2
|
+
import { ImageSourcePropType } from 'react-native';
|
|
3
|
+
import { Initials } from '../../../models/initials.model';
|
|
4
|
+
import { VisualState } from '../../../types/visual-state.enum';
|
|
5
5
|
type ChildListItemProps = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
department: string;
|
|
9
|
+
selectable: boolean;
|
|
10
|
+
isSelected: boolean;
|
|
11
|
+
onPressArrow: (id: string) => void;
|
|
12
|
+
onPressText: (id: string) => void;
|
|
13
|
+
onLongPress: (id: string) => void;
|
|
14
|
+
onSelect: (id: string) => void;
|
|
15
|
+
sourceAvatar: ImageSourcePropType | Initials;
|
|
16
|
+
textTimeTracker: string;
|
|
17
|
+
visualStateTimeTracker: VisualState;
|
|
18
|
+
tags?: string[];
|
|
18
19
|
};
|
|
19
|
-
declare const ChildListItem: React.MemoExoticComponent<
|
|
20
|
-
|
|
21
|
-
id,
|
|
22
|
-
name,
|
|
23
|
-
department,
|
|
24
|
-
selectable,
|
|
25
|
-
isSelected,
|
|
26
|
-
onPressArrow,
|
|
27
|
-
onPressText,
|
|
28
|
-
onLongPress,
|
|
29
|
-
onSelect,
|
|
30
|
-
sourceAvatar,
|
|
31
|
-
textTimeTracker,
|
|
32
|
-
visualStateTimeTracker,
|
|
33
|
-
}: ChildListItemProps) => JSX.Element
|
|
34
|
-
>;
|
|
35
|
-
export {ChildListItem as ChildListItem};
|
|
20
|
+
declare const ChildListItem: React.MemoExoticComponent<({ id, name, department, selectable, isSelected, onPressArrow, onPressText, onLongPress, onSelect, sourceAvatar, textTimeTracker, visualStateTimeTracker, tags, }: ChildListItemProps) => JSX.Element>;
|
|
21
|
+
export { ChildListItem as ChildListItem };
|
|
@@ -8,10 +8,11 @@ import {Size} from '../../../types/size.enum';
|
|
|
8
8
|
import {VisualState} from '../../../types/visual-state.enum';
|
|
9
9
|
import {Avatar} from '../../molecules/avatar/avatar.component';
|
|
10
10
|
import {Stylesheet} from './child-list-item.styles';
|
|
11
|
-
import {SmallText} from '../../atoms/paragraph-components';
|
|
11
|
+
import {SmallText, TinyText} from '../../atoms/paragraph-components';
|
|
12
12
|
import {Heading2} from '../../atoms/heading-components';
|
|
13
13
|
import {TimeTracker} from '../../molecules/time-tracker/time-tracker.component';
|
|
14
14
|
import {Icon} from '../../../icons/index';
|
|
15
|
+
import {ChildListTag} from './components/child-list-tag.component';
|
|
15
16
|
|
|
16
17
|
type ChildListItemProps = {
|
|
17
18
|
id: string;
|
|
@@ -26,6 +27,7 @@ type ChildListItemProps = {
|
|
|
26
27
|
sourceAvatar: ImageSourcePropType | Initials;
|
|
27
28
|
textTimeTracker: string;
|
|
28
29
|
visualStateTimeTracker: VisualState;
|
|
30
|
+
tags?: string[];
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
const ChildListItem = React.memo(
|
|
@@ -42,6 +44,7 @@ const ChildListItem = React.memo(
|
|
|
42
44
|
sourceAvatar,
|
|
43
45
|
textTimeTracker,
|
|
44
46
|
visualStateTimeTracker,
|
|
47
|
+
tags,
|
|
45
48
|
}: ChildListItemProps) => {
|
|
46
49
|
const context = useContext(ThemeCtx);
|
|
47
50
|
const styles = Stylesheet(isSelected, context);
|
|
@@ -105,6 +108,26 @@ const ChildListItem = React.memo(
|
|
|
105
108
|
{department}
|
|
106
109
|
</SmallText>
|
|
107
110
|
</View>
|
|
111
|
+
{tags && (
|
|
112
|
+
<View
|
|
113
|
+
style={{
|
|
114
|
+
flexDirection: 'row',
|
|
115
|
+
gap: 6,
|
|
116
|
+
flexWrap: 'wrap',
|
|
117
|
+
marginTop: 10,
|
|
118
|
+
}}
|
|
119
|
+
>
|
|
120
|
+
{tags.map((tag) => {
|
|
121
|
+
return (
|
|
122
|
+
<ChildListTag
|
|
123
|
+
key={`${id}--${tag}`}
|
|
124
|
+
label={tag}
|
|
125
|
+
isSelected={isSelected}
|
|
126
|
+
/>
|
|
127
|
+
);
|
|
128
|
+
})}
|
|
129
|
+
</View>
|
|
130
|
+
)}
|
|
108
131
|
</View>
|
|
109
132
|
</Pressable>
|
|
110
133
|
{!selectable && (
|
|
@@ -10,14 +10,23 @@ interface IData {
|
|
|
10
10
|
id: string;
|
|
11
11
|
name: string;
|
|
12
12
|
department: string;
|
|
13
|
+
tags?: string[];
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
const data: IData[] = [];
|
|
16
17
|
for (let i = 0; i < 6; i++) {
|
|
18
|
+
const tagsChance = Math.random(); // Generate a random number between 0 and 1
|
|
19
|
+
let tagsArray: string[] | undefined;
|
|
20
|
+
|
|
21
|
+
if (tagsChance > 0.5) {
|
|
22
|
+
tagsArray = ['Gezondheid', 'Allergie', 'Voedsel', 'Slaap'];
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
data.push({
|
|
18
26
|
id: 'child' + i,
|
|
19
27
|
name: 'Children with very long names because in 2023 we give our kids special name',
|
|
20
28
|
department: 'De Teddybeertjes',
|
|
29
|
+
tags: tagsArray,
|
|
21
30
|
});
|
|
22
31
|
}
|
|
23
32
|
|
|
@@ -63,6 +72,7 @@ export const ChildListItemPreview = ({}: {}) => {
|
|
|
63
72
|
sourceAvatar={Initials.for('Zeno', 'Driesen')}
|
|
64
73
|
textTimeTracker={'3u45m'}
|
|
65
74
|
visualStateTimeTracker={VisualState.SUCCESS}
|
|
75
|
+
tags={item.tags}
|
|
66
76
|
/>
|
|
67
77
|
);
|
|
68
78
|
};
|
|
@@ -92,6 +102,7 @@ export const ChildListItemPreview = ({}: {}) => {
|
|
|
92
102
|
style={{
|
|
93
103
|
flex: 1,
|
|
94
104
|
}}
|
|
105
|
+
contentContainerStyle={{gap: 16}}
|
|
95
106
|
data={data}
|
|
96
107
|
renderItem={renderChildList}
|
|
97
108
|
keyExtractor={(item) => item.id}
|
|
@@ -1,42 +1,36 @@
|
|
|
1
|
-
export function Stylesheet(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
overflow: 'hidden';
|
|
37
|
-
};
|
|
38
|
-
trackerContainer: {
|
|
39
|
-
flexDirection: 'row';
|
|
40
|
-
alignItems: 'center';
|
|
41
|
-
};
|
|
1
|
+
export function Stylesheet(isSelectedItem: any, context: any): {
|
|
2
|
+
container: {
|
|
3
|
+
width: string;
|
|
4
|
+
borderTopRightRadius: number;
|
|
5
|
+
borderBottomRightRadius: number;
|
|
6
|
+
borderTopLeftRadius: number;
|
|
7
|
+
borderBottomLeftRadius: number;
|
|
8
|
+
flexDirection: "row";
|
|
9
|
+
backgroundColor: any;
|
|
10
|
+
};
|
|
11
|
+
innerContainer: {
|
|
12
|
+
flex: number;
|
|
13
|
+
padding: number;
|
|
14
|
+
flexDirection: "row";
|
|
15
|
+
borderTopRightRadius: number;
|
|
16
|
+
borderBottomRightRadius: number;
|
|
17
|
+
borderTopLeftRadius: number;
|
|
18
|
+
borderBottomLeftRadius: number;
|
|
19
|
+
};
|
|
20
|
+
pressableText: {
|
|
21
|
+
marginLeft: number;
|
|
22
|
+
flex: number;
|
|
23
|
+
};
|
|
24
|
+
iconContainer: {
|
|
25
|
+
alignItems: "flex-end";
|
|
26
|
+
justifyContent: "center";
|
|
27
|
+
paddingRight: number;
|
|
28
|
+
width: number;
|
|
29
|
+
borderTopRightRadius: number;
|
|
30
|
+
borderBottomRightRadius: number;
|
|
31
|
+
};
|
|
32
|
+
trackerContainer: {
|
|
33
|
+
flexDirection: "row";
|
|
34
|
+
alignItems: "center";
|
|
35
|
+
};
|
|
42
36
|
};
|
|
@@ -8,8 +8,8 @@ export const Stylesheet = (isSelectedItem, context) =>
|
|
|
8
8
|
width: '100%',
|
|
9
9
|
borderTopRightRadius: Scale.l,
|
|
10
10
|
borderBottomRightRadius: Scale.l,
|
|
11
|
-
borderTopLeftRadius: Scale.
|
|
12
|
-
borderBottomLeftRadius: Scale.
|
|
11
|
+
borderTopLeftRadius: Scale.xl,
|
|
12
|
+
borderBottomLeftRadius: Scale.xl,
|
|
13
13
|
flexDirection: 'row',
|
|
14
14
|
backgroundColor: isSelectedItem
|
|
15
15
|
? context.colors.main[6]
|
|
@@ -19,7 +19,6 @@ export const Stylesheet = (isSelectedItem, context) =>
|
|
|
19
19
|
flex: 1,
|
|
20
20
|
padding: Scale.xs,
|
|
21
21
|
flexDirection: 'row',
|
|
22
|
-
alignItems: 'center',
|
|
23
22
|
borderTopRightRadius: Scale.l,
|
|
24
23
|
borderBottomRightRadius: Scale.l,
|
|
25
24
|
borderTopLeftRadius: Scale.xxl,
|
|
@@ -4,11 +4,11 @@ import {ChildListItem} from './child-list-item.component';
|
|
|
4
4
|
import {VisualState} from '../../../types/visual-state.enum';
|
|
5
5
|
|
|
6
6
|
describe('test child list item component', () => {
|
|
7
|
-
it('make text that is too long end in ...', () => {
|
|
7
|
+
it('make text that is too long end in ... and has tags', () => {
|
|
8
8
|
const tree = render
|
|
9
9
|
.create(
|
|
10
10
|
<ChildListItem
|
|
11
|
-
id={1}
|
|
11
|
+
id={'1'}
|
|
12
12
|
name={'Jean-Paul Janssens-Peeters'}
|
|
13
13
|
department={'De Teddybeertjes'}
|
|
14
14
|
selectable={true}
|
|
@@ -16,9 +16,11 @@ describe('test child list item component', () => {
|
|
|
16
16
|
onPressArrow={() => console.log('pressedArrow')}
|
|
17
17
|
onPressText={() => console.log('pressedText')}
|
|
18
18
|
onSelect={() => console.log('selected')}
|
|
19
|
+
onLongPress={() => console.log('long press')}
|
|
19
20
|
sourceAvatar={require('./../../../../assets/components/avatar/baby.png')}
|
|
20
21
|
textTimeTracker={'time tracker'}
|
|
21
22
|
visualStateTimeTracker={VisualState.SUCCESS}
|
|
23
|
+
tags={['tag1', 'tag2']}
|
|
22
24
|
/>
|
|
23
25
|
)
|
|
24
26
|
.toJSON();
|
|
@@ -29,7 +31,7 @@ describe('test child list item component', () => {
|
|
|
29
31
|
const tree = render
|
|
30
32
|
.create(
|
|
31
33
|
<ChildListItem
|
|
32
|
-
id={1}
|
|
34
|
+
id={'1'}
|
|
33
35
|
name={'Jean-Paul Janssens-Peeters'}
|
|
34
36
|
department={'De Teddybeertjes'}
|
|
35
37
|
selectable={true}
|
|
@@ -37,6 +39,7 @@ describe('test child list item component', () => {
|
|
|
37
39
|
onPressArrow={() => console.log('pressedArrow')}
|
|
38
40
|
onPressText={() => console.log('pressedText')}
|
|
39
41
|
onSelect={() => console.log('selected')}
|
|
42
|
+
onLongPress={() => console.log('long press')}
|
|
40
43
|
sourceAvatar={require('./../../../../assets/components/avatar/baby.png')}
|
|
41
44
|
textTimeTracker={'time tracker'}
|
|
42
45
|
visualStateTimeTracker={VisualState.SUCCESS}
|
|
@@ -50,7 +53,7 @@ describe('test child list item component', () => {
|
|
|
50
53
|
const tree = render
|
|
51
54
|
.create(
|
|
52
55
|
<ChildListItem
|
|
53
|
-
id={1}
|
|
56
|
+
id={'1'}
|
|
54
57
|
name={'Jean-Paul Janssens-Peeters'}
|
|
55
58
|
department={'De Teddybeertjes'}
|
|
56
59
|
selectable={false}
|
|
@@ -58,9 +61,11 @@ describe('test child list item component', () => {
|
|
|
58
61
|
onPressArrow={() => console.log('pressedArrow')}
|
|
59
62
|
onPressText={() => console.log('pressedText')}
|
|
60
63
|
onSelect={() => console.log('selected')}
|
|
64
|
+
onLongPress={() => console.log('long press')}
|
|
61
65
|
sourceAvatar={require('./../../../../assets/components/avatar/baby.png')}
|
|
62
66
|
textTimeTracker={'time tracker'}
|
|
63
67
|
visualStateTimeTracker={VisualState.SUCCESS}
|
|
68
|
+
tags={['tag1', 'tag2']}
|
|
64
69
|
/>
|
|
65
70
|
)
|
|
66
71
|
.toJSON();
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, {useContext} from 'react';
|
|
2
|
+
import {View} from 'react-native';
|
|
3
|
+
import {TinyText} from '../../../atoms/paragraph-components';
|
|
4
|
+
import {ThemeCtx} from '../../../../context/theme.context';
|
|
5
|
+
import {Stylesheet} from './child-list-tag.styles';
|
|
6
|
+
|
|
7
|
+
type ChildListTagProps = {
|
|
8
|
+
label: string;
|
|
9
|
+
isSelected: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const ChildListTag = ({label, isSelected}: ChildListTagProps) => {
|
|
13
|
+
const context = useContext(ThemeCtx);
|
|
14
|
+
const styles = Stylesheet(context, isSelected);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<View style={styles.rootContainer}>
|
|
18
|
+
<TinyText
|
|
19
|
+
textAlign={'center'}
|
|
20
|
+
textColor={
|
|
21
|
+
!isSelected ? context.colors.ui.darkgrey : context.colors.ui.white
|
|
22
|
+
}
|
|
23
|
+
>
|
|
24
|
+
{label}
|
|
25
|
+
</TinyText>
|
|
26
|
+
</View>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
import {Scale} from '../../../../theme/scale/index';
|
|
3
|
+
|
|
4
|
+
export const Stylesheet = (context, isSelected) =>
|
|
5
|
+
StyleSheet.create({
|
|
6
|
+
rootContainer: {
|
|
7
|
+
backgroundColor: !isSelected
|
|
8
|
+
? context.colors.ui.lightgrey
|
|
9
|
+
: context.colors.main[5],
|
|
10
|
+
borderRadius: 50,
|
|
11
|
+
paddingLeft: Scale.s,
|
|
12
|
+
paddingTop: Scale.xxs,
|
|
13
|
+
paddingRight: Scale.s,
|
|
14
|
+
paddingBottom: Scale.xxs,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
type ContactItemProps = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
name: string;
|
|
3
|
+
label: string;
|
|
4
|
+
onPress?: () => void;
|
|
5
|
+
isBlocked?: boolean;
|
|
6
6
|
};
|
|
7
|
-
declare const ContactItem: ({
|
|
8
|
-
|
|
9
|
-
label,
|
|
10
|
-
onPress,
|
|
11
|
-
isBlocked,
|
|
12
|
-
}: ContactItemProps) => JSX.Element;
|
|
13
|
-
export {ContactItem as ContactItem};
|
|
7
|
+
declare const ContactItem: ({ name, label, onPress, isBlocked }: ContactItemProps) => JSX.Element;
|
|
8
|
+
export { ContactItem as ContactItem };
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
|
|
1
|
+
import { ToddleDateTime } from '../../../utilities/toddle-datetime/toddle-datetime.class';
|
|
2
2
|
type DaySelectProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
onSelectDate: (date: ToddleDateTime) => void;
|
|
4
|
+
startDate: ToddleDateTime;
|
|
5
|
+
selectedDate: ToddleDateTime;
|
|
6
6
|
};
|
|
7
|
-
declare const DaySelect: ({
|
|
8
|
-
|
|
9
|
-
selectedDate,
|
|
10
|
-
startDate,
|
|
11
|
-
}: DaySelectProps) => JSX.Element;
|
|
12
|
-
export {DaySelect as DaySelect};
|
|
7
|
+
declare const DaySelect: ({ onSelectDate, selectedDate, startDate }: DaySelectProps) => JSX.Element;
|
|
8
|
+
export { DaySelect as DaySelect };
|
|
@@ -5,14 +5,18 @@ import {View} from 'react-native';
|
|
|
5
5
|
import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
|
|
6
6
|
|
|
7
7
|
export const DaySelectPreview = ({}: {}) => {
|
|
8
|
-
const [
|
|
8
|
+
const [startOfWeek, setStartOfWeek] = useState(ToddleDateTime.local());
|
|
9
|
+
|
|
10
|
+
const [selectedDate, setSelectedDate] = useState<ToddleDateTime>(
|
|
11
|
+
ToddleDateTime.local()
|
|
12
|
+
);
|
|
9
13
|
|
|
10
14
|
return (
|
|
11
|
-
<View>
|
|
15
|
+
<View style={{paddingHorizontal: 48}}>
|
|
12
16
|
<DaySelect
|
|
13
|
-
startDate={
|
|
14
|
-
onSelectDate={
|
|
15
|
-
selectedDate={
|
|
17
|
+
startDate={startOfWeek}
|
|
18
|
+
onSelectDate={setSelectedDate}
|
|
19
|
+
selectedDate={selectedDate}
|
|
16
20
|
/>
|
|
17
21
|
</View>
|
|
18
22
|
);
|