@tactics/toddle-styleguide 1.0.0 → 1.0.2
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 +27 -0
- package/index.d.ts +5 -1
- package/index.tsx +8 -0
- package/package.json +1 -1
- package/src/components/{templates/popover/components → atoms}/backdrop/backdrop.component.tsx +1 -1
- package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +54 -54
- package/src/components/atoms/calendar/calendar.component.tsx +4 -2
- package/src/components/atoms/footer/__snapshots__/footer.test.js.snap +9 -9
- package/src/components/atoms/increment-input/__snapshots__/increment-input.test.js.snap +18 -18
- package/src/components/atoms/increment-input/increment-input.component.tsx +12 -2
- package/src/components/atoms/split-container/__snapshots__/split-container.test.js.snap +9 -9
- package/src/components/molecules/blocked-message/__snapshots__/blocked-message.test.js.snap +9 -9
- package/src/components/molecules/blocked-message/blocked-message.component.tsx +6 -1
- package/src/components/molecules/button/__snapshots__/button.test.js.snap +36 -30
- package/src/components/molecules/button/button.component.d.ts +6 -3
- package/src/components/molecules/button/button.component.tsx +27 -3
- package/src/components/molecules/button/button.preview.tsx +6 -3
- package/src/components/molecules/button/button.test.js +9 -6
- package/src/components/molecules/calendar-select/__snapshots__/calendar-select.test.js.snap +29 -29
- package/src/components/molecules/calendar-select/calendar-select.component.tsx +7 -4
- package/src/components/molecules/calendar-select/calendar-select.styles.js +2 -2
- package/src/components/molecules/date-input/__snapshots__/date-input.test.js.snap +9 -9
- package/src/components/molecules/date-input/date-input.component.tsx +5 -1
- package/src/components/molecules/default-select/__snapshots__/default-select.test.js.snap +9 -9
- package/src/components/molecules/default-select/default-select.component.tsx +5 -1
- package/src/components/molecules/failed-to-send/__snapshots__/failed-bubble.test.js.snap +27 -27
- package/src/components/molecules/failed-to-send/failed-bubble.component.tsx +14 -3
- package/src/components/molecules/language-button/__snapshots__/language-button.test.js.snap +95 -0
- package/src/components/molecules/language-button/language-button.component.d.ts +7 -0
- package/src/components/molecules/language-button/language-button.component.tsx +33 -0
- package/src/components/molecules/language-button/language-button.preview.d.ts +1 -0
- package/src/components/molecules/language-button/language-button.preview.tsx +29 -0
- package/src/components/molecules/language-button/language-button.styles.d.ts +8 -0
- package/src/components/molecules/language-button/language-button.styles.js +12 -0
- package/src/components/molecules/language-button/language-button.test.js +29 -0
- package/src/components/molecules/message-input/__snapshots__/message-input.test.js.snap +140 -72
- package/src/components/molecules/message-input/message-input.component.tsx +10 -2
- package/src/components/molecules/more-info-button/__snapshots__/more-info-button.test.js.snap +99 -0
- package/src/components/molecules/more-info-button/more-info-button.component.d.ts +7 -0
- package/src/components/molecules/more-info-button/more-info-button.component.tsx +33 -0
- package/src/components/molecules/more-info-button/more-info-button.preview.d.ts +1 -0
- package/src/components/molecules/more-info-button/more-info-button.preview.tsx +29 -0
- package/src/components/molecules/more-info-button/more-info-button.styles.d.ts +10 -0
- package/src/components/molecules/more-info-button/more-info-button.styles.js +15 -0
- package/src/components/molecules/more-info-button/more-info-button.test.js +29 -0
- package/src/components/molecules/password-input/__snapshots__/password-input.test.js.snap +30 -30
- package/src/components/molecules/password-input/password-input.component.tsx +10 -2
- package/src/components/molecules/pressable-icon/__snapshots__/pressable-icon.test.js.snap +36 -36
- package/src/components/molecules/pressable-icon/pressable-icon.preview.tsx +4 -4
- package/src/components/molecules/pressable-icon/pressable-icon.test.js +8 -4
- package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +15 -18
- package/src/components/molecules/search-input/search.component.tsx +6 -2
- package/src/components/molecules/search-input/search.styles.js +5 -8
- package/src/components/molecules/select-list-item/__snapshots__/select-list-item.test.js.snap +431 -431
- package/src/components/molecules/select-list-item/select-list-item-preview.tsx +3 -4
- package/src/components/molecules/select-list-item/select-list-item.component.tsx +21 -18
- package/src/components/molecules/select-list-item/select-list-item.styles.js +10 -7
- package/src/components/molecules/select-picker/__snapshots__/select-picker.test.js.snap +18 -20
- package/src/components/molecules/select-picker/select-picker.component.tsx +6 -1
- package/src/components/molecules/select-picker/select-picker.styles.js +2 -2
- package/src/components/molecules/send-bubble/__snapshots__/send-text-bubble.test.js.snap +108 -108
- package/src/components/molecules/send-bubble/send-text-bubble.component.tsx +2 -2
- package/src/components/molecules/snackbar/__snapshots__/snackbar.test.js.snap +36 -36
- package/src/components/molecules/snackbar/snackbar.component.tsx +21 -2
- package/src/components/molecules/swipe/__snapshots__/swipe.test.js.snap +15 -11
- package/src/components/molecules/swipe/swipe.component.tsx +10 -2
- package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +10 -10
- package/src/components/organisms/child-list-item/child-list-item.component.tsx +7 -2
- package/src/components/organisms/child-list-item/child-list-item.preview.tsx +7 -1
- package/src/components/organisms/contact-item/__snapshots__/contact-item.test.js.snap +18 -18
- package/src/components/organisms/contact-item/contact-item.component.tsx +6 -1
- package/src/components/organisms/loading-indicator/__snapshots__/loading-indicator.test.js.snap +474 -0
- package/src/components/organisms/loading-indicator/animation-style.animate.d.ts +3 -0
- package/src/components/organisms/loading-indicator/animation-style.animate.ts +164 -0
- package/src/components/organisms/loading-indicator/container.component.d.ts +1 -0
- package/src/components/organisms/loading-indicator/container.component.tsx +65 -0
- package/src/components/organisms/loading-indicator/dot.component.d.ts +6 -0
- package/src/components/organisms/loading-indicator/dot.component.tsx +27 -0
- package/src/components/organisms/loading-indicator/loading-indicator.component.d.ts +2 -0
- package/src/components/organisms/loading-indicator/loading-indicator.component.tsx +21 -0
- package/src/components/organisms/loading-indicator/loading-indicator.preview.d.ts +1 -0
- package/src/components/organisms/loading-indicator/loading-indicator.preview.tsx +100 -0
- package/src/components/organisms/loading-indicator/loading-indicator.test.js +40 -0
- package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +18 -18
- package/src/components/organisms/my-child-list-item/my-child-list-item.component.tsx +12 -2
- package/src/components/organisms/text-bubble/__snapshots__/text-bubble.test.js.snap +135 -135
- package/src/components/organisms/text-bubble/text-bubble.test.js +0 -1
- package/src/components/templates/modal/components/fade-panel.component.d.ts +11 -0
- package/src/components/templates/modal/components/fade-panel.component.tsx +53 -0
- package/src/components/templates/modal/components/fade-panel.styles.d.ts +16 -0
- package/src/components/templates/modal/components/fade-panel.styles.js +17 -0
- package/src/components/templates/modal/modal-preview.styles.d.ts +13 -0
- package/src/components/templates/modal/modal-preview.styles.js +17 -0
- package/src/components/templates/modal/modal.component.d.ts +10 -0
- package/src/components/templates/modal/modal.component.tsx +56 -0
- package/src/components/templates/modal/modal.preview.d.ts +1 -0
- package/src/components/templates/modal/modal.preview.tsx +73 -0
- package/src/components/templates/modal/modal.styles.d.ts +21 -0
- package/src/components/templates/modal/modal.styles.js +23 -0
- package/src/components/templates/popover/components/index.js +1 -1
- package/src/components/templates/popover/components/modal/close/close.component.tsx +9 -4
- package/src/components/templates/popover/components/modal/close/close.styles.d.ts +4 -3
- package/src/components/templates/popover/components/modal/close/close.styles.js +8 -5
- package/src/components/templates/popover/components/modal/heading/heading.styles.js +1 -1
- package/src/components/templates/popover/components/modal/modal.component.tsx +1 -1
- package/src/components/templates/popover/components/modal/modal.styles.js +1 -1
- package/src/components/templates/popover/popover.component.tsx +2 -1
- package/src/context/loading-dots.context.d.ts +8 -0
- package/src/context/loading-dots.context.tsx +33 -0
- package/src/icons/__snapshots__/icons.test.js.snap +572 -482
- package/src/icons/icons.test.js +126 -51
- package/src/icons/index.d.ts +2 -56
- package/src/icons/index.tsx +11 -3
- package/src/icons/outline/calendar/calendar.icon.d.ts +2 -2
- package/src/icons/outline/calendar/calendar.icon.tsx +5 -4
- package/src/icons/outline/chat/chat.icon.d.ts +2 -2
- package/src/icons/outline/chat/chat.icon.tsx +5 -4
- package/src/icons/outline/chat-alt/chat-alt.icon.d.ts +2 -2
- package/src/icons/outline/chat-alt/chat-alt.icon.tsx +5 -4
- package/src/icons/outline/check-circle/check-circle.icon.d.ts +2 -2
- package/src/icons/outline/check-circle/check-circle.icon.tsx +5 -4
- package/src/icons/outline/chevron-left/chevron-left.icon.d.ts +2 -2
- package/src/icons/outline/chevron-left/chevron-left.icon.tsx +5 -4
- package/src/icons/outline/chevron-right/chevron-right.icon.d.ts +2 -2
- package/src/icons/outline/chevron-right/chevron-right.icon.tsx +5 -4
- package/src/icons/outline/clock/clock.icon.d.ts +2 -2
- package/src/icons/outline/clock/clock.icon.tsx +5 -4
- package/src/icons/outline/cloud-download/cloud-download.icon.d.ts +2 -2
- package/src/icons/outline/cloud-download/cloud-download.icon.tsx +5 -4
- package/src/icons/outline/currency-euro/currency-euro.icon.d.ts +2 -2
- package/src/icons/outline/currency-euro/currency-euro.icon.tsx +5 -4
- package/src/icons/outline/document-text/document-text.icon.d.ts +2 -2
- package/src/icons/outline/document-text/document-text.icon.tsx +5 -4
- package/src/icons/outline/exclamation/exclamation.icon.d.ts +2 -2
- package/src/icons/outline/exclamation/exclamation.icon.tsx +5 -4
- package/src/icons/outline/exclamation-circle/exclamation-circle.icon.d.ts +2 -2
- package/src/icons/outline/exclamation-circle/exclamation-circle.icon.tsx +8 -4
- package/src/icons/outline/eye/eye.icon.d.ts +2 -2
- package/src/icons/outline/eye/eye.icon.tsx +6 -5
- package/src/icons/outline/eye-off/eye-off.icon.d.ts +2 -2
- package/src/icons/outline/eye-off/eye-off.icon.tsx +4 -3
- package/src/icons/outline/filter/filter.icon.d.ts +2 -2
- package/src/icons/outline/filter/filter.icon.tsx +5 -42
- package/src/icons/outline/information-circle/information-circle.icon.d.ts +2 -2
- package/src/icons/outline/information-circle/information-circle.icon.tsx +8 -4
- package/src/icons/outline/logout/logout.icon.d.ts +2 -2
- package/src/icons/outline/logout/logout.icon.tsx +11 -4
- package/src/icons/outline/mail/mail.icon.d.ts +2 -2
- package/src/icons/outline/mail/mail.icon.tsx +5 -4
- package/src/icons/outline/mail-open/mail-open.icon.d.ts +2 -2
- package/src/icons/outline/mail-open/mail-open.icon.tsx +5 -4
- package/src/icons/outline/menu/menu.icon.d.ts +2 -2
- package/src/icons/outline/menu/menu.icon.tsx +5 -4
- package/src/icons/outline/minus-sm/minus-sm.icon.d.ts +2 -2
- package/src/icons/outline/minus-sm/minus-sm.icon.tsx +5 -9
- package/src/icons/outline/office-building/office-building.icon.d.ts +2 -2
- package/src/icons/outline/office-building/office-building.icon.tsx +5 -4
- package/src/icons/outline/outline-default.preview.tsx +49 -45
- package/src/icons/outline/outline-grey.preview.tsx +56 -40
- package/src/icons/outline/outline-white.preview.tsx +61 -41
- package/src/icons/outline/outline.d.ts +2 -42
- package/src/icons/outline/outline.tsx +99 -42
- package/src/icons/outline/paper-airplane/paper-airplane.icon.d.ts +2 -2
- package/src/icons/outline/paper-airplane/paper-airplane.icon.tsx +11 -4
- package/src/icons/outline/paperclip/paperclip.icon.d.ts +2 -2
- package/src/icons/outline/paperclip/paperclip.icon.tsx +5 -4
- package/src/icons/outline/pencil/pencil.icon.d.ts +2 -2
- package/src/icons/outline/pencil/pencil.icon.tsx +5 -4
- package/src/icons/outline/phone/phone.icon.d.ts +2 -2
- package/src/icons/outline/phone/phone.icon.tsx +5 -4
- package/src/icons/outline/plus/plus.icon.d.ts +2 -2
- package/src/icons/outline/plus/plus.icon.tsx +5 -4
- package/src/icons/outline/plus-sm/plus-sm.icon.d.ts +2 -2
- package/src/icons/outline/plus-sm/plus-sm.icon.tsx +5 -9
- package/src/icons/outline/qrcode/qrcode.icon.d.ts +2 -2
- package/src/icons/outline/qrcode/qrcode.icon.tsx +5 -4
- package/src/icons/outline/refresh/refresh.icon.d.ts +2 -2
- package/src/icons/outline/refresh/refresh.icon.tsx +5 -4
- package/src/icons/outline/search/search.icon.d.ts +2 -2
- package/src/icons/outline/search/search.icon.tsx +5 -4
- package/src/icons/outline/selector/selector.icon.d.ts +2 -2
- package/src/icons/outline/selector/selector.icon.tsx +5 -4
- package/src/icons/outline/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -2
- package/src/icons/outline/sm-view-grid-add/sm-view-grid-add.icon.tsx +5 -4
- package/src/icons/outline/status-online/status-online.icon.d.ts +2 -2
- package/src/icons/outline/status-online/status-online.icon.tsx +5 -4
- package/src/icons/outline/thumb-up/thumb-up.icon.d.ts +2 -2
- package/src/icons/outline/thumb-up/thumb-up.icon.tsx +5 -4
- package/src/icons/outline/trash/trash.icon.d.ts +2 -2
- package/src/icons/outline/trash/trash.icon.tsx +5 -4
- package/src/icons/outline/user/user.icon.d.ts +2 -2
- package/src/icons/outline/user/user.icon.tsx +6 -5
- package/src/icons/outline/user-group/user-group.icon.d.ts +2 -2
- package/src/icons/outline/user-group/user-group.icon.tsx +5 -4
- package/src/icons/outline/users/users.icon.d.ts +2 -2
- package/src/icons/outline/users/users.icon.tsx +5 -4
- package/src/icons/outline/xmark/xmark.icon.d.ts +2 -0
- package/src/icons/outline/{cross/cross.icon.tsx → xmark/xmark.icon.tsx} +5 -4
- package/src/icons/solid/calendar/calendar.icon.d.ts +2 -0
- package/src/icons/solid/calendar/calendar.icon.tsx +21 -0
- package/src/icons/solid/chat/chat.icon.d.ts +2 -0
- package/src/icons/solid/chat/chat.icon.tsx +21 -0
- package/src/icons/solid/chat-alt/chat-alt-solid.icon.d.ts +2 -2
- package/src/icons/solid/chat-alt/chat-alt-solid.icon.tsx +5 -4
- package/src/icons/solid/check-circle/check-circle.icon.d.ts +2 -0
- package/src/icons/solid/check-circle/check-circle.icon.tsx +21 -0
- package/src/icons/solid/chevron-left/chevron-left.icon.d.ts +2 -0
- package/src/icons/solid/chevron-left/chevron-left.icon.tsx +21 -0
- package/src/icons/solid/chevron-right/chevron-right.icon.d.ts +2 -0
- package/src/icons/solid/chevron-right/chevron-right.icon.tsx +21 -0
- package/src/icons/solid/clock/clock-solid.icon.d.ts +2 -2
- package/src/icons/solid/clock/clock-solid.icon.tsx +5 -4
- package/src/icons/solid/cloud-download/cloud-download.icon.d.ts +2 -0
- package/src/icons/solid/cloud-download/cloud-download.icon.tsx +21 -0
- package/src/icons/solid/currency-euro/currency-euro.icon.d.ts +2 -0
- package/src/icons/solid/currency-euro/currency-euro.icon.tsx +21 -0
- package/src/icons/solid/document-text/document-text-solid.icon.d.ts +2 -2
- package/src/icons/solid/document-text/document-text-solid.icon.tsx +4 -3
- package/src/icons/solid/exclamation/exclamation.icon.d.ts +2 -0
- package/src/icons/solid/exclamation/exclamation.icon.tsx +20 -0
- package/src/icons/solid/exclamation-circle/exclamation-circle.icon.d.ts +2 -0
- package/src/icons/solid/exclamation-circle/exclamation-circle.icon.tsx +23 -0
- package/src/icons/solid/eye/eye.icon.d.ts +2 -0
- package/src/icons/solid/eye/eye.icon.tsx +24 -0
- package/src/icons/solid/eye-off/eye-off.icon.d.ts +2 -0
- package/src/icons/solid/eye-off/eye-off.icon.tsx +24 -0
- package/src/icons/solid/filter/filter.icon.d.ts +2 -0
- package/src/icons/solid/filter/filter.icon.tsx +21 -0
- package/src/icons/solid/information-circle/information-circle-solid.icon.d.ts +2 -2
- package/src/icons/solid/information-circle/information-circle-solid.icon.tsx +8 -4
- package/src/icons/solid/logout/logout.icon.d.ts +2 -0
- package/src/icons/solid/logout/logout.icon.tsx +26 -0
- package/src/icons/solid/mail/mail.icon.d.ts +2 -0
- package/src/icons/solid/mail/mail.icon.tsx +23 -0
- package/src/icons/solid/mail-open/mail-open.icon.d.ts +2 -0
- package/src/icons/solid/mail-open/mail-open.icon.tsx +21 -0
- package/src/icons/solid/menu/menu.icon.d.ts +2 -0
- package/src/icons/solid/menu/menu.icon.tsx +33 -0
- package/src/icons/solid/minus-sm/minus-sm.icon.d.ts +2 -0
- package/src/icons/solid/minus-sm/minus-sm.icon.tsx +21 -0
- package/src/icons/solid/office-building/office-building.icon.d.ts +2 -0
- package/src/icons/solid/office-building/office-building.icon.tsx +21 -0
- package/src/icons/solid/paper-airplane/paper-airplane.icon.d.ts +2 -0
- package/src/icons/solid/paper-airplane/paper-airplane.icon.tsx +25 -0
- package/src/icons/solid/paperclip/paperclip.icon.d.ts +2 -0
- package/src/icons/solid/paperclip/paperclip.icon.tsx +21 -0
- package/src/icons/solid/pencil/pencil-solid.icon.d.ts +2 -2
- package/src/icons/solid/pencil/pencil-solid.icon.tsx +6 -5
- package/src/icons/solid/phone/phone-solid.icon.d.ts +2 -2
- package/src/icons/solid/phone/phone-solid.icon.tsx +5 -4
- package/src/icons/solid/plus/plus.icon.d.ts +2 -0
- package/src/icons/solid/plus/plus.icon.tsx +21 -0
- package/src/icons/solid/plus-sm/plus-sm.icon.d.ts +2 -0
- package/src/icons/solid/plus-sm/plus-sm.icon.tsx +21 -0
- package/src/icons/solid/qrcode/qrcode.icon.d.ts +2 -0
- package/src/icons/solid/qrcode/qrcode.icon.tsx +60 -0
- package/src/icons/solid/refresh/refresh-solid.icon.d.ts +2 -2
- package/src/icons/solid/refresh/refresh-solid.icon.tsx +5 -4
- package/src/icons/solid/search/search.icon.d.ts +2 -0
- package/src/icons/solid/search/search.icon.tsx +21 -0
- package/src/icons/solid/selector/selector.icon.d.ts +2 -0
- package/src/icons/solid/selector/selector.icon.tsx +21 -0
- package/src/icons/solid/sm-view-grid-add/sm-view-grid-add.icon.d.ts +2 -0
- package/src/icons/solid/sm-view-grid-add/sm-view-grid-add.icon.tsx +31 -0
- package/src/icons/solid/solid.d.ts +2 -12
- package/src/icons/solid/solid.preview.tsx +95 -30
- package/src/icons/solid/solid.tsx +133 -21
- package/src/icons/solid/status-online/status-online-solid.icon.d.ts +2 -2
- package/src/icons/solid/status-online/status-online-solid.icon.tsx +5 -10
- package/src/icons/solid/thumb-up/thumb-up.icon.d.ts +2 -0
- package/src/icons/solid/thumb-up/thumb-up.icon.tsx +23 -0
- package/src/icons/solid/trash/trash-solid.icon.d.ts +2 -2
- package/src/icons/solid/trash/trash-solid.icon.tsx +5 -4
- package/src/icons/solid/user/user.icon.d.ts +2 -0
- package/src/icons/solid/user/user.icon.tsx +23 -0
- package/src/icons/solid/user-group/user-group.icon.d.ts +2 -0
- package/src/icons/solid/user-group/user-group.icon.tsx +72 -0
- package/src/icons/solid/users/users-solid.icon.d.ts +2 -2
- package/src/icons/solid/users/users-solid.icon.tsx +29 -3
- package/src/icons/solid/xmark/xmark.icon.d.ts +2 -0
- package/src/icons/solid/xmark/xmark.icon.tsx +21 -0
- package/src/interfaces/icon.interface.d.ts +11 -0
- package/src/interfaces/icon.interface.ts +12 -0
- package/src/theme/provider/parent.theme.ts +1 -1
- package/src/types/icontype.type.d.ts +2 -4
- package/src/types/icontype.type.ts +43 -4
- package/src/types/loading-dots.type.d.ts +8 -0
- package/src/types/loading-dots.type.ts +8 -0
- package/src/icons/outline/cross/cross.icon.d.ts +0 -2
- /package/src/components/{templates/popover/components → atoms}/backdrop/backdrop.component.d.ts +0 -0
- /package/src/components/{templates/popover/components → atoms}/backdrop/backdrop.styles.d.ts +0 -0
- /package/src/components/{templates/popover/components → atoms}/backdrop/backdrop.styles.js +0 -0
|
@@ -35,11 +35,11 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
35
35
|
>
|
|
36
36
|
<RNSVGSvgView
|
|
37
37
|
align="xMidYMid"
|
|
38
|
-
bbHeight=
|
|
39
|
-
bbWidth=
|
|
38
|
+
bbHeight={24}
|
|
39
|
+
bbWidth={24}
|
|
40
40
|
fill="none"
|
|
41
41
|
focusable={false}
|
|
42
|
-
height=
|
|
42
|
+
height={24}
|
|
43
43
|
meetOrSlice={0}
|
|
44
44
|
minX={0}
|
|
45
45
|
minY={0}
|
|
@@ -51,14 +51,14 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"flex": 0,
|
|
54
|
-
"height":
|
|
55
|
-
"width":
|
|
54
|
+
"height": 24,
|
|
55
|
+
"width": 24,
|
|
56
56
|
},
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
|
-
vbHeight={
|
|
60
|
-
vbWidth={
|
|
61
|
-
width=
|
|
59
|
+
vbHeight={22}
|
|
60
|
+
vbWidth={21}
|
|
61
|
+
width={24}
|
|
62
62
|
>
|
|
63
63
|
<RNSVGGroup
|
|
64
64
|
fill={null}
|
|
@@ -69,7 +69,7 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
69
69
|
}
|
|
70
70
|
>
|
|
71
71
|
<RNSVGPath
|
|
72
|
-
d="
|
|
72
|
+
d="M13.4359 5.58333L6.30125 12.7179C5.45511 13.5641 5.45511 14.9359 6.30125 15.7821C7.14739 16.6282 8.51924 16.6282 9.36538 15.7821L16.3141 8.64746C18.0064 6.95519 18.0064 4.21148 16.3141 2.5192C14.6218 0.826932 11.8781 0.826932 10.1859 2.5192L3.23712 9.65381C0.698711 12.1922 0.698711 16.3078 3.23712 18.8462C5.77553 21.3846 9.8911 21.3846 12.4295 18.8462L19.2083 12.0833"
|
|
73
73
|
propList={
|
|
74
74
|
[
|
|
75
75
|
"stroke",
|
|
@@ -122,11 +122,11 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
122
122
|
>
|
|
123
123
|
<RNSVGSvgView
|
|
124
124
|
align="xMidYMid"
|
|
125
|
-
bbHeight=
|
|
126
|
-
bbWidth=
|
|
125
|
+
bbHeight={24}
|
|
126
|
+
bbWidth={24}
|
|
127
127
|
fill="none"
|
|
128
128
|
focusable={false}
|
|
129
|
-
height=
|
|
129
|
+
height={24}
|
|
130
130
|
meetOrSlice={0}
|
|
131
131
|
minX={0}
|
|
132
132
|
minY={0}
|
|
@@ -136,19 +136,36 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
136
136
|
"backgroundColor": "transparent",
|
|
137
137
|
"borderWidth": 0,
|
|
138
138
|
},
|
|
139
|
+
{
|
|
140
|
+
"transform": [
|
|
141
|
+
{
|
|
142
|
+
"rotate": "90deg",
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
},
|
|
139
146
|
{
|
|
140
147
|
"flex": 0,
|
|
141
|
-
"height":
|
|
142
|
-
"width":
|
|
148
|
+
"height": 24,
|
|
149
|
+
"width": 24,
|
|
143
150
|
},
|
|
144
151
|
]
|
|
145
152
|
}
|
|
146
|
-
vbHeight={
|
|
147
|
-
vbWidth={
|
|
148
|
-
width=
|
|
153
|
+
vbHeight={22}
|
|
154
|
+
vbWidth={23}
|
|
155
|
+
width={24}
|
|
149
156
|
>
|
|
150
157
|
<RNSVGGroup
|
|
151
158
|
fill={null}
|
|
159
|
+
matrix={
|
|
160
|
+
[
|
|
161
|
+
1,
|
|
162
|
+
0,
|
|
163
|
+
0,
|
|
164
|
+
1,
|
|
165
|
+
0,
|
|
166
|
+
0,
|
|
167
|
+
]
|
|
168
|
+
}
|
|
152
169
|
propList={
|
|
153
170
|
[
|
|
154
171
|
"fill",
|
|
@@ -156,7 +173,7 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
156
173
|
}
|
|
157
174
|
>
|
|
158
175
|
<RNSVGPath
|
|
159
|
-
d="
|
|
176
|
+
d="M11.5 18.5833L21.625 20.75L11.5 1.25L1.375 20.75L11.5 18.5833ZM11.5 18.5833V9.91667"
|
|
160
177
|
propList={
|
|
161
178
|
[
|
|
162
179
|
"stroke",
|
|
@@ -211,11 +228,11 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
211
228
|
>
|
|
212
229
|
<RNSVGSvgView
|
|
213
230
|
align="xMidYMid"
|
|
214
|
-
bbHeight=
|
|
215
|
-
bbWidth=
|
|
231
|
+
bbHeight={24}
|
|
232
|
+
bbWidth={24}
|
|
216
233
|
fill="none"
|
|
217
234
|
focusable={false}
|
|
218
|
-
height=
|
|
235
|
+
height={24}
|
|
219
236
|
meetOrSlice={0}
|
|
220
237
|
minX={0}
|
|
221
238
|
minY={0}
|
|
@@ -227,14 +244,14 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
227
244
|
},
|
|
228
245
|
{
|
|
229
246
|
"flex": 0,
|
|
230
|
-
"height":
|
|
231
|
-
"width":
|
|
247
|
+
"height": 24,
|
|
248
|
+
"width": 24,
|
|
232
249
|
},
|
|
233
250
|
]
|
|
234
251
|
}
|
|
235
|
-
vbHeight={
|
|
236
|
-
vbWidth={
|
|
237
|
-
width=
|
|
252
|
+
vbHeight={22}
|
|
253
|
+
vbWidth={21}
|
|
254
|
+
width={24}
|
|
238
255
|
>
|
|
239
256
|
<RNSVGGroup
|
|
240
257
|
fill={null}
|
|
@@ -245,7 +262,7 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
245
262
|
}
|
|
246
263
|
>
|
|
247
264
|
<RNSVGPath
|
|
248
|
-
d="
|
|
265
|
+
d="M13.4359 5.58333L6.30125 12.7179C5.45511 13.5641 5.45511 14.9359 6.30125 15.7821C7.14739 16.6282 8.51924 16.6282 9.36538 15.7821L16.3141 8.64746C18.0064 6.95519 18.0064 4.21148 16.3141 2.5192C14.6218 0.826932 11.8781 0.826932 10.1859 2.5192L3.23712 9.65381C0.698711 12.1922 0.698711 16.3078 3.23712 18.8462C5.77553 21.3846 9.8911 21.3846 12.4295 18.8462L19.2083 12.0833"
|
|
249
266
|
propList={
|
|
250
267
|
[
|
|
251
268
|
"stroke",
|
|
@@ -298,11 +315,11 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
298
315
|
>
|
|
299
316
|
<RNSVGSvgView
|
|
300
317
|
align="xMidYMid"
|
|
301
|
-
bbHeight=
|
|
302
|
-
bbWidth=
|
|
318
|
+
bbHeight={24}
|
|
319
|
+
bbWidth={24}
|
|
303
320
|
fill="none"
|
|
304
321
|
focusable={false}
|
|
305
|
-
height=
|
|
322
|
+
height={24}
|
|
306
323
|
meetOrSlice={0}
|
|
307
324
|
minX={0}
|
|
308
325
|
minY={0}
|
|
@@ -312,19 +329,36 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
312
329
|
"backgroundColor": "transparent",
|
|
313
330
|
"borderWidth": 0,
|
|
314
331
|
},
|
|
332
|
+
{
|
|
333
|
+
"transform": [
|
|
334
|
+
{
|
|
335
|
+
"rotate": "90deg",
|
|
336
|
+
},
|
|
337
|
+
],
|
|
338
|
+
},
|
|
315
339
|
{
|
|
316
340
|
"flex": 0,
|
|
317
|
-
"height":
|
|
318
|
-
"width":
|
|
341
|
+
"height": 24,
|
|
342
|
+
"width": 24,
|
|
319
343
|
},
|
|
320
344
|
]
|
|
321
345
|
}
|
|
322
|
-
vbHeight={
|
|
323
|
-
vbWidth={
|
|
324
|
-
width=
|
|
346
|
+
vbHeight={22}
|
|
347
|
+
vbWidth={23}
|
|
348
|
+
width={24}
|
|
325
349
|
>
|
|
326
350
|
<RNSVGGroup
|
|
327
351
|
fill={null}
|
|
352
|
+
matrix={
|
|
353
|
+
[
|
|
354
|
+
1,
|
|
355
|
+
0,
|
|
356
|
+
0,
|
|
357
|
+
1,
|
|
358
|
+
0,
|
|
359
|
+
0,
|
|
360
|
+
]
|
|
361
|
+
}
|
|
328
362
|
propList={
|
|
329
363
|
[
|
|
330
364
|
"fill",
|
|
@@ -332,7 +366,7 @@ exports[`Message Input test render a message text input component with placehold
|
|
|
332
366
|
}
|
|
333
367
|
>
|
|
334
368
|
<RNSVGPath
|
|
335
|
-
d="
|
|
369
|
+
d="M11.5 18.5833L21.625 20.75L11.5 1.25L1.375 20.75L11.5 18.5833ZM11.5 18.5833V9.91667"
|
|
336
370
|
propList={
|
|
337
371
|
[
|
|
338
372
|
"stroke",
|
|
@@ -387,11 +421,11 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
387
421
|
>
|
|
388
422
|
<RNSVGSvgView
|
|
389
423
|
align="xMidYMid"
|
|
390
|
-
bbHeight=
|
|
391
|
-
bbWidth=
|
|
424
|
+
bbHeight={24}
|
|
425
|
+
bbWidth={24}
|
|
392
426
|
fill="none"
|
|
393
427
|
focusable={false}
|
|
394
|
-
height=
|
|
428
|
+
height={24}
|
|
395
429
|
meetOrSlice={0}
|
|
396
430
|
minX={0}
|
|
397
431
|
minY={0}
|
|
@@ -403,14 +437,14 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
403
437
|
},
|
|
404
438
|
{
|
|
405
439
|
"flex": 0,
|
|
406
|
-
"height":
|
|
407
|
-
"width":
|
|
440
|
+
"height": 24,
|
|
441
|
+
"width": 24,
|
|
408
442
|
},
|
|
409
443
|
]
|
|
410
444
|
}
|
|
411
|
-
vbHeight={
|
|
412
|
-
vbWidth={
|
|
413
|
-
width=
|
|
445
|
+
vbHeight={22}
|
|
446
|
+
vbWidth={21}
|
|
447
|
+
width={24}
|
|
414
448
|
>
|
|
415
449
|
<RNSVGGroup
|
|
416
450
|
fill={null}
|
|
@@ -421,7 +455,7 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
421
455
|
}
|
|
422
456
|
>
|
|
423
457
|
<RNSVGPath
|
|
424
|
-
d="
|
|
458
|
+
d="M13.4359 5.58333L6.30125 12.7179C5.45511 13.5641 5.45511 14.9359 6.30125 15.7821C7.14739 16.6282 8.51924 16.6282 9.36538 15.7821L16.3141 8.64746C18.0064 6.95519 18.0064 4.21148 16.3141 2.5192C14.6218 0.826932 11.8781 0.826932 10.1859 2.5192L3.23712 9.65381C0.698711 12.1922 0.698711 16.3078 3.23712 18.8462C5.77553 21.3846 9.8911 21.3846 12.4295 18.8462L19.2083 12.0833"
|
|
425
459
|
propList={
|
|
426
460
|
[
|
|
427
461
|
"stroke",
|
|
@@ -473,11 +507,11 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
473
507
|
>
|
|
474
508
|
<RNSVGSvgView
|
|
475
509
|
align="xMidYMid"
|
|
476
|
-
bbHeight=
|
|
477
|
-
bbWidth=
|
|
510
|
+
bbHeight={24}
|
|
511
|
+
bbWidth={24}
|
|
478
512
|
fill="none"
|
|
479
513
|
focusable={false}
|
|
480
|
-
height=
|
|
514
|
+
height={24}
|
|
481
515
|
meetOrSlice={0}
|
|
482
516
|
minX={0}
|
|
483
517
|
minY={0}
|
|
@@ -487,19 +521,36 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
487
521
|
"backgroundColor": "transparent",
|
|
488
522
|
"borderWidth": 0,
|
|
489
523
|
},
|
|
524
|
+
{
|
|
525
|
+
"transform": [
|
|
526
|
+
{
|
|
527
|
+
"rotate": "90deg",
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
},
|
|
490
531
|
{
|
|
491
532
|
"flex": 0,
|
|
492
|
-
"height":
|
|
493
|
-
"width":
|
|
533
|
+
"height": 24,
|
|
534
|
+
"width": 24,
|
|
494
535
|
},
|
|
495
536
|
]
|
|
496
537
|
}
|
|
497
|
-
vbHeight={
|
|
498
|
-
vbWidth={
|
|
499
|
-
width=
|
|
538
|
+
vbHeight={22}
|
|
539
|
+
vbWidth={23}
|
|
540
|
+
width={24}
|
|
500
541
|
>
|
|
501
542
|
<RNSVGGroup
|
|
502
543
|
fill={null}
|
|
544
|
+
matrix={
|
|
545
|
+
[
|
|
546
|
+
1,
|
|
547
|
+
0,
|
|
548
|
+
0,
|
|
549
|
+
1,
|
|
550
|
+
0,
|
|
551
|
+
0,
|
|
552
|
+
]
|
|
553
|
+
}
|
|
503
554
|
propList={
|
|
504
555
|
[
|
|
505
556
|
"fill",
|
|
@@ -507,7 +558,7 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
507
558
|
}
|
|
508
559
|
>
|
|
509
560
|
<RNSVGPath
|
|
510
|
-
d="
|
|
561
|
+
d="M11.5 18.5833L21.625 20.75L11.5 1.25L1.375 20.75L11.5 18.5833ZM11.5 18.5833V9.91667"
|
|
511
562
|
propList={
|
|
512
563
|
[
|
|
513
564
|
"stroke",
|
|
@@ -562,11 +613,11 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
562
613
|
>
|
|
563
614
|
<RNSVGSvgView
|
|
564
615
|
align="xMidYMid"
|
|
565
|
-
bbHeight=
|
|
566
|
-
bbWidth=
|
|
616
|
+
bbHeight={24}
|
|
617
|
+
bbWidth={24}
|
|
567
618
|
fill="none"
|
|
568
619
|
focusable={false}
|
|
569
|
-
height=
|
|
620
|
+
height={24}
|
|
570
621
|
meetOrSlice={0}
|
|
571
622
|
minX={0}
|
|
572
623
|
minY={0}
|
|
@@ -578,14 +629,14 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
578
629
|
},
|
|
579
630
|
{
|
|
580
631
|
"flex": 0,
|
|
581
|
-
"height":
|
|
582
|
-
"width":
|
|
632
|
+
"height": 24,
|
|
633
|
+
"width": 24,
|
|
583
634
|
},
|
|
584
635
|
]
|
|
585
636
|
}
|
|
586
|
-
vbHeight={
|
|
587
|
-
vbWidth={
|
|
588
|
-
width=
|
|
637
|
+
vbHeight={22}
|
|
638
|
+
vbWidth={21}
|
|
639
|
+
width={24}
|
|
589
640
|
>
|
|
590
641
|
<RNSVGGroup
|
|
591
642
|
fill={null}
|
|
@@ -596,7 +647,7 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
596
647
|
}
|
|
597
648
|
>
|
|
598
649
|
<RNSVGPath
|
|
599
|
-
d="
|
|
650
|
+
d="M13.4359 5.58333L6.30125 12.7179C5.45511 13.5641 5.45511 14.9359 6.30125 15.7821C7.14739 16.6282 8.51924 16.6282 9.36538 15.7821L16.3141 8.64746C18.0064 6.95519 18.0064 4.21148 16.3141 2.5192C14.6218 0.826932 11.8781 0.826932 10.1859 2.5192L3.23712 9.65381C0.698711 12.1922 0.698711 16.3078 3.23712 18.8462C5.77553 21.3846 9.8911 21.3846 12.4295 18.8462L19.2083 12.0833"
|
|
600
651
|
propList={
|
|
601
652
|
[
|
|
602
653
|
"stroke",
|
|
@@ -648,11 +699,11 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
648
699
|
>
|
|
649
700
|
<RNSVGSvgView
|
|
650
701
|
align="xMidYMid"
|
|
651
|
-
bbHeight=
|
|
652
|
-
bbWidth=
|
|
702
|
+
bbHeight={24}
|
|
703
|
+
bbWidth={24}
|
|
653
704
|
fill="none"
|
|
654
705
|
focusable={false}
|
|
655
|
-
height=
|
|
706
|
+
height={24}
|
|
656
707
|
meetOrSlice={0}
|
|
657
708
|
minX={0}
|
|
658
709
|
minY={0}
|
|
@@ -662,19 +713,36 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
662
713
|
"backgroundColor": "transparent",
|
|
663
714
|
"borderWidth": 0,
|
|
664
715
|
},
|
|
716
|
+
{
|
|
717
|
+
"transform": [
|
|
718
|
+
{
|
|
719
|
+
"rotate": "90deg",
|
|
720
|
+
},
|
|
721
|
+
],
|
|
722
|
+
},
|
|
665
723
|
{
|
|
666
724
|
"flex": 0,
|
|
667
|
-
"height":
|
|
668
|
-
"width":
|
|
725
|
+
"height": 24,
|
|
726
|
+
"width": 24,
|
|
669
727
|
},
|
|
670
728
|
]
|
|
671
729
|
}
|
|
672
|
-
vbHeight={
|
|
673
|
-
vbWidth={
|
|
674
|
-
width=
|
|
730
|
+
vbHeight={22}
|
|
731
|
+
vbWidth={23}
|
|
732
|
+
width={24}
|
|
675
733
|
>
|
|
676
734
|
<RNSVGGroup
|
|
677
735
|
fill={null}
|
|
736
|
+
matrix={
|
|
737
|
+
[
|
|
738
|
+
1,
|
|
739
|
+
0,
|
|
740
|
+
0,
|
|
741
|
+
1,
|
|
742
|
+
0,
|
|
743
|
+
0,
|
|
744
|
+
]
|
|
745
|
+
}
|
|
678
746
|
propList={
|
|
679
747
|
[
|
|
680
748
|
"fill",
|
|
@@ -682,7 +750,7 @@ exports[`Message Input test render a message text input component without placeh
|
|
|
682
750
|
}
|
|
683
751
|
>
|
|
684
752
|
<RNSVGPath
|
|
685
|
-
d="
|
|
753
|
+
d="M11.5 18.5833L21.625 20.75L11.5 1.25L1.375 20.75L11.5 18.5833ZM11.5 18.5833V9.91667"
|
|
686
754
|
propList={
|
|
687
755
|
[
|
|
688
756
|
"stroke",
|
|
@@ -27,7 +27,11 @@ const MessageInput = ({
|
|
|
27
27
|
return (
|
|
28
28
|
<View style={styles.rootContainer}>
|
|
29
29
|
<Pressable onPress={() => console.log('pressed add attachment')}>
|
|
30
|
-
<Icon
|
|
30
|
+
<Icon
|
|
31
|
+
style={'regular'}
|
|
32
|
+
name={'paper-clip'}
|
|
33
|
+
color={Context.colors.ui.black}
|
|
34
|
+
/>
|
|
31
35
|
</Pressable>
|
|
32
36
|
<RNTextInput
|
|
33
37
|
style={styles.textInput}
|
|
@@ -39,7 +43,11 @@ const MessageInput = ({
|
|
|
39
43
|
keyboardType={keyboardType ? keyboardType : KeyBoardTypes.DEFAULT}
|
|
40
44
|
/>
|
|
41
45
|
<Pressable onPress={onPressSend}>
|
|
42
|
-
<Icon
|
|
46
|
+
<Icon
|
|
47
|
+
style={'regular'}
|
|
48
|
+
name={'paper-airplane'}
|
|
49
|
+
color={Context.colors.ui.black}
|
|
50
|
+
/>
|
|
43
51
|
</Pressable>
|
|
44
52
|
</View>
|
|
45
53
|
);
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`more info button should render a more info button in a black text color, underlined 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
accessible={true}
|
|
6
|
+
collapsable={false}
|
|
7
|
+
focusable={true}
|
|
8
|
+
onBlur={[Function]}
|
|
9
|
+
onClick={[Function]}
|
|
10
|
+
onFocus={[Function]}
|
|
11
|
+
onResponderGrant={[Function]}
|
|
12
|
+
onResponderMove={[Function]}
|
|
13
|
+
onResponderRelease={[Function]}
|
|
14
|
+
onResponderTerminate={[Function]}
|
|
15
|
+
onResponderTerminationRequest={[Function]}
|
|
16
|
+
onStartShouldSetResponder={[Function]}
|
|
17
|
+
style={
|
|
18
|
+
{
|
|
19
|
+
"alignItems": "center",
|
|
20
|
+
"justifyContent": "center",
|
|
21
|
+
"minHeight": 42,
|
|
22
|
+
"minWidth": 42,
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
>
|
|
26
|
+
<Text
|
|
27
|
+
style={
|
|
28
|
+
[
|
|
29
|
+
[
|
|
30
|
+
{
|
|
31
|
+
"fontFamily": "Montserrat",
|
|
32
|
+
"fontSize": 14,
|
|
33
|
+
"lineHeight": 22.4,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
{
|
|
37
|
+
"color": "#000000",
|
|
38
|
+
"textAlign": "center",
|
|
39
|
+
"width": "100%",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"textDecorationLine": "underline",
|
|
43
|
+
},
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
>
|
|
47
|
+
Meer info
|
|
48
|
+
</Text>
|
|
49
|
+
</View>
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
exports[`more info button should render a more info button in a white text color, underlined 1`] = `
|
|
53
|
+
<View
|
|
54
|
+
accessible={true}
|
|
55
|
+
collapsable={false}
|
|
56
|
+
focusable={true}
|
|
57
|
+
onBlur={[Function]}
|
|
58
|
+
onClick={[Function]}
|
|
59
|
+
onFocus={[Function]}
|
|
60
|
+
onResponderGrant={[Function]}
|
|
61
|
+
onResponderMove={[Function]}
|
|
62
|
+
onResponderRelease={[Function]}
|
|
63
|
+
onResponderTerminate={[Function]}
|
|
64
|
+
onResponderTerminationRequest={[Function]}
|
|
65
|
+
onStartShouldSetResponder={[Function]}
|
|
66
|
+
style={
|
|
67
|
+
{
|
|
68
|
+
"alignItems": "center",
|
|
69
|
+
"justifyContent": "center",
|
|
70
|
+
"minHeight": 42,
|
|
71
|
+
"minWidth": 42,
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
>
|
|
75
|
+
<Text
|
|
76
|
+
style={
|
|
77
|
+
[
|
|
78
|
+
[
|
|
79
|
+
{
|
|
80
|
+
"fontFamily": "Montserrat",
|
|
81
|
+
"fontSize": 14,
|
|
82
|
+
"lineHeight": 22.4,
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
{
|
|
86
|
+
"color": "#FFFFFF",
|
|
87
|
+
"textAlign": "center",
|
|
88
|
+
"width": "100%",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"textDecorationLine": "underline",
|
|
92
|
+
},
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
>
|
|
96
|
+
More info
|
|
97
|
+
</Text>
|
|
98
|
+
</View>
|
|
99
|
+
`;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {useContext} from 'react';
|
|
3
|
+
import {Pressable} from 'react-native';
|
|
4
|
+
import {ThemeCtx} from '../../../context/theme.context';
|
|
5
|
+
import {Stylesheet} from './more-info-button.styles';
|
|
6
|
+
import {Paragraph} from '../../atoms/paragraph-components';
|
|
7
|
+
|
|
8
|
+
type MoreInfoButtonProps = {
|
|
9
|
+
label: string;
|
|
10
|
+
onPress?: () => void;
|
|
11
|
+
textColor?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const MoreInfoButton = ({
|
|
15
|
+
label,
|
|
16
|
+
onPress,
|
|
17
|
+
textColor,
|
|
18
|
+
}: MoreInfoButtonProps) => {
|
|
19
|
+
const Context = useContext(ThemeCtx);
|
|
20
|
+
const styles = Stylesheet();
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Pressable onPress={onPress} style={styles.container}>
|
|
24
|
+
<Paragraph
|
|
25
|
+
textAlign={'center'}
|
|
26
|
+
textColor={textColor ? textColor : Context.colors.ui.white}
|
|
27
|
+
addStyle={styles.underline}
|
|
28
|
+
>
|
|
29
|
+
{label}
|
|
30
|
+
</Paragraph>
|
|
31
|
+
</Pressable>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MoreInfoButtonPreview: ({}: {}) => JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, {useContext} from 'react';
|
|
2
|
+
import {MoreInfoButton} from './more-info-button.component';
|
|
3
|
+
import {ThemeCtx} from '../../../context/theme.context';
|
|
4
|
+
|
|
5
|
+
const {View} = require('react-native');
|
|
6
|
+
|
|
7
|
+
export const MoreInfoButtonPreview = ({}: {}) => {
|
|
8
|
+
const Context = useContext(ThemeCtx);
|
|
9
|
+
return (
|
|
10
|
+
<View
|
|
11
|
+
style={{
|
|
12
|
+
flex: 1,
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
justifyContent: 'center',
|
|
15
|
+
backgroundColor: Context.colors.main['0'],
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
<MoreInfoButton
|
|
19
|
+
label={'More info'}
|
|
20
|
+
onPress={() => console.log('pressed more info')}
|
|
21
|
+
/>
|
|
22
|
+
<MoreInfoButton
|
|
23
|
+
label={'More info'}
|
|
24
|
+
onPress={() => console.log('pressed more info')}
|
|
25
|
+
textColor={'#FF0000'}
|
|
26
|
+
/>
|
|
27
|
+
</View>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
import {Scale} from '../../../theme/scale';
|
|
3
|
+
|
|
4
|
+
export const Stylesheet = () =>
|
|
5
|
+
StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
minWidth: Scale.m * 2.625,
|
|
8
|
+
minHeight: Scale.m * 2.625,
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
},
|
|
12
|
+
underline: {
|
|
13
|
+
textDecorationLine: 'underline',
|
|
14
|
+
},
|
|
15
|
+
});
|