@tactics/toddle-styleguide 1.2.8 → 1.3.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.
Files changed (106) hide show
  1. package/App.tsx +11 -0
  2. package/index.d.ts +2 -1
  3. package/index.tsx +2 -0
  4. package/package.json +1 -1
  5. package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +18 -18
  6. package/src/components/atoms/line/line.component.d.ts +12 -0
  7. package/src/components/atoms/line/line.component.tsx +23 -0
  8. package/src/components/atoms/line/line.preview.d.ts +1 -0
  9. package/src/components/atoms/line/line.preview.tsx +54 -0
  10. package/src/components/atoms/line/line.styles.d.ts +12 -0
  11. package/src/components/atoms/line/line.styles.js +10 -0
  12. package/src/components/atoms/quick-message/__snapshots__/quick-message.test.js.snap +72 -1
  13. package/src/components/atoms/quick-message/quick-message.component.d.ts +2 -0
  14. package/src/components/atoms/quick-message/quick-message.component.tsx +3 -1
  15. package/src/components/atoms/quick-message/quick-message.preview.tsx +10 -1
  16. package/src/components/atoms/quick-message/quick-message.styles.d.ts +4 -1
  17. package/src/components/atoms/quick-message/quick-message.styles.js +4 -2
  18. package/src/components/atoms/quick-message/quick-message.test.js +38 -6
  19. package/src/components/atoms/text-input/__snapshots__/text-input.test.js.snap +38 -78
  20. package/src/components/atoms/text-input/text-input.component.tsx +6 -9
  21. package/src/components/atoms/text-input/text-input.preview.tsx +3 -3
  22. package/src/components/atoms/text-input/text-input.styles.d.ts +9 -25
  23. package/src/components/atoms/text-input/text-input.styles.js +7 -13
  24. package/src/components/molecules/day/__snapshots__/day.test.js.snap +24 -24
  25. package/src/components/molecules/day/day.component.tsx +17 -4
  26. package/src/components/molecules/day/day.styles.d.ts +33 -42
  27. package/src/components/molecules/day/day.styles.js +14 -17
  28. package/src/components/molecules/failed-to-send/failed-bubble.component.d.ts +2 -2
  29. package/src/components/molecules/failed-to-send/failed-bubble.component.tsx +39 -22
  30. package/src/components/molecules/password-input/__snapshots__/password-input.test.js.snap +53 -68
  31. package/src/components/molecules/password-input/password-input.component.tsx +7 -9
  32. package/src/components/molecules/password-input/password-input.styles.d.ts +8 -7
  33. package/src/components/molecules/password-input/password-input.styles.js +6 -6
  34. package/src/components/molecules/search-input/__snapshots__/search.test.js.snap +30 -31
  35. package/src/components/molecules/search-input/search.component.d.ts +9 -11
  36. package/src/components/molecules/search-input/search.component.tsx +19 -30
  37. package/src/components/molecules/search-input/search.preview.tsx +8 -6
  38. package/src/components/molecules/search-input/search.styles.d.ts +12 -11
  39. package/src/components/molecules/search-input/search.styles.js +14 -8
  40. package/src/components/molecules/search-input/search.test.js +3 -1
  41. package/src/components/molecules/send-bubble/__snapshots__/send-text-bubble.test.js.snap +12 -32
  42. package/src/components/molecules/send-bubble/send-text-bubble.component.d.ts +4 -4
  43. package/src/components/molecules/send-bubble/send-text-bubble.component.tsx +36 -25
  44. package/src/components/molecules/send-bubble/send-text-bubble.styles.d.ts +4 -7
  45. package/src/components/molecules/send-bubble/send-text-bubble.styles.js +2 -8
  46. package/src/components/molecules/timeline/__snapshots__/timeline.test.js.snap +4 -4
  47. package/src/components/molecules/timeline/timeline.styles.d.ts +1 -1
  48. package/src/components/molecules/timeline/timeline.styles.js +2 -2
  49. package/src/components/molecules/timestamp/__snapshots__/timestamp.test.js.snap +2 -1
  50. package/src/components/molecules/timestamp/timestamp.component.d.ts +2 -1
  51. package/src/components/molecules/timestamp/timestamp.component.tsx +4 -7
  52. package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +165 -10
  53. package/src/components/organisms/child-list-item/child-list-item.component.d.ts +2 -0
  54. package/src/components/organisms/child-list-item/child-list-item.component.tsx +24 -1
  55. package/src/components/organisms/child-list-item/child-list-item.preview.tsx +11 -0
  56. package/src/components/organisms/child-list-item/child-list-item.styles.d.ts +0 -3
  57. package/src/components/organisms/child-list-item/child-list-item.styles.js +2 -3
  58. package/src/components/organisms/child-list-item/child-list-item.test.js +9 -4
  59. package/src/components/organisms/child-list-item/components/child-list-tag.component.d.ts +9 -0
  60. package/src/components/organisms/child-list-item/components/child-list-tag.component.tsx +28 -0
  61. package/src/components/organisms/child-list-item/components/child-list-tag.styles.d.ts +13 -0
  62. package/src/components/organisms/child-list-item/components/child-list-tag.styles.js +16 -0
  63. package/src/components/organisms/day-select/day-select.preview.tsx +9 -5
  64. package/src/components/organisms/journal-entry/components/entry-type-indicator/entry-type-indicator.d.ts +9 -0
  65. package/src/components/organisms/journal-entry/components/entry-type-indicator/entry-type-indicator.styles.d.ts +13 -0
  66. package/src/components/organisms/journal-entry/components/entry-type-indicator/entry-type-indicator.styles.js +17 -0
  67. package/src/components/organisms/journal-entry/components/entry-type-indicator/entry-type-indicator.test.js +21 -0
  68. package/src/components/organisms/journal-entry/components/entry-type-indicator/entry-type-indicator.tsx +97 -0
  69. package/src/components/organisms/journal-entry/components/index.d.ts +2 -0
  70. package/src/components/organisms/journal-entry/components/index.ts +2 -0
  71. package/src/components/organisms/journal-entry/components/journal-entry-type/__snapshots__/journal-entry-type.test.js.snap +304 -0
  72. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.d.ts +16 -0
  73. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.component.tsx +60 -0
  74. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.styles.d.ts +13 -0
  75. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.styles.js +16 -0
  76. package/src/components/organisms/journal-entry/components/journal-entry-type/journal-entry-type.test.js +48 -0
  77. package/src/components/organisms/journal-entry/journal-entry.component.d.ts +38 -0
  78. package/src/components/organisms/journal-entry/journal-entry.component.tsx +139 -0
  79. package/src/components/organisms/journal-entry/journal-entry.preview.d.ts +1 -0
  80. package/src/components/organisms/journal-entry/journal-entry.preview.tsx +212 -0
  81. package/src/components/organisms/journal-entry/journal-entry.styles.d.ts +42 -0
  82. package/src/components/organisms/journal-entry/journal-entry.styles.js +35 -0
  83. package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +143 -399
  84. package/src/components/organisms/my-child-list-item/my-child-list-item.component.d.ts +5 -7
  85. package/src/components/organisms/my-child-list-item/my-child-list-item.component.tsx +32 -59
  86. package/src/components/organisms/my-child-list-item/my-child-list-item.preview.tsx +36 -24
  87. package/src/components/organisms/my-child-list-item/my-child-list-item.styles.d.ts +15 -11
  88. package/src/components/organisms/my-child-list-item/my-child-list-item.styles.js +16 -11
  89. package/src/components/organisms/my-child-list-item/my-child-list-item.test.js +5 -22
  90. package/src/components/organisms/text-bubble/__snapshots__/text-bubble.test.js.snap +45 -29
  91. package/src/components/organisms/text-bubble/text-bubble.component.d.ts +8 -6
  92. package/src/components/organisms/text-bubble/text-bubble.component.tsx +14 -12
  93. package/src/components/organisms/text-bubble/text-bubble.preview.tsx +14 -19
  94. package/src/components/organisms/text-bubble/text-bubble.styles.d.ts +14 -3
  95. package/src/components/organisms/text-bubble/text-bubble.styles.js +6 -0
  96. package/src/components/organisms/text-bubble/text-bubble.test.js +7 -7
  97. package/src/components/templates/modal/components/fade-panel.component.tsx +1 -1
  98. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.d.ts +4 -0
  99. package/src/utilities/toddle-datetime/interfaces/toddle-datetime.interface.tsx +6 -0
  100. package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +14 -1
  101. package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +31 -2
  102. package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +114 -84
  103. package/src/utilities/toddle-datetime/types/{duration-like.type.d.ts → duration.type.d.ts} +2 -0
  104. package/src/utilities/toddle-datetime/types/{duration-like.type.tsx → duration.type.tsx} +3 -0
  105. package/src/utilities/toddle-datetime/types/toddle-datetime.type.d.ts +1 -0
  106. package/src/utilities/toddle-datetime/types/toddle-datetime.type.tsx +8 -1
@@ -19,7 +19,6 @@ exports[`Failed text bubble test shows a DEFAULT RECEIVED text bubble that is sw
19
19
  "backgroundColor": "#E0E8F9",
20
20
  },
21
21
  false,
22
- false,
23
22
  {
24
23
  "borderBottomLeftRadius": 8,
25
24
  "borderBottomRightRadius": 32,
@@ -319,7 +318,6 @@ exports[`Failed text bubble test shows a DEFAULT RECEIVED text bubble that is sw
319
318
  "backgroundColor": "#E0E8F9",
320
319
  },
321
320
  false,
322
- false,
323
321
  ],
324
322
  ]
325
323
  }
@@ -352,7 +350,6 @@ exports[`Failed text bubble test shows a DEFAULT SENT text bubble that is swipea
352
350
  },
353
351
  false,
354
352
  false,
355
- false,
356
353
  {
357
354
  "borderBottomLeftRadius": 32,
358
355
  "borderBottomRightRadius": 8,
@@ -651,7 +648,6 @@ exports[`Failed text bubble test shows a DEFAULT SENT text bubble that is swipea
651
648
  "backgroundColor": "#E0E8F9",
652
649
  },
653
650
  false,
654
- false,
655
651
  ],
656
652
  ]
657
653
  }
@@ -681,9 +677,8 @@ exports[`Failed text bubble test shows a WARNING RECEIVED text bubble that is sw
681
677
  },
682
678
  false,
683
679
  {
684
- "backgroundColor": "#FEEFDB",
680
+ "backgroundColor": "#FFD398",
685
681
  },
686
- false,
687
682
  {
688
683
  "borderBottomLeftRadius": 8,
689
684
  "borderBottomRightRadius": 32,
@@ -970,7 +965,7 @@ exports[`Failed text bubble test shows a WARNING RECEIVED text bubble that is sw
970
965
  },
971
966
  ],
972
967
  {
973
- "color": "#FAAC44",
968
+ "color": "#1F2933",
974
969
  "textAlign": undefined,
975
970
  "width": "100%",
976
971
  },
@@ -981,9 +976,8 @@ exports[`Failed text bubble test shows a WARNING RECEIVED text bubble that is sw
981
976
  },
982
977
  false,
983
978
  {
984
- "backgroundColor": "#FEEFDB",
979
+ "backgroundColor": "#FFD398",
985
980
  },
986
- false,
987
981
  ],
988
982
  ]
989
983
  }
@@ -1013,10 +1007,9 @@ exports[`Failed text bubble test shows a WARNING SENT text bubble that is swipea
1013
1007
  },
1014
1008
  false,
1015
1009
  {
1016
- "backgroundColor": "#FEEFDB",
1010
+ "backgroundColor": "#FFD398",
1017
1011
  },
1018
1012
  false,
1019
- false,
1020
1013
  {
1021
1014
  "borderBottomLeftRadius": 32,
1022
1015
  "borderBottomRightRadius": 8,
@@ -1302,7 +1295,7 @@ exports[`Failed text bubble test shows a WARNING SENT text bubble that is swipea
1302
1295
  },
1303
1296
  ],
1304
1297
  {
1305
- "color": "#FAAC44",
1298
+ "color": "#1F2933",
1306
1299
  "textAlign": undefined,
1307
1300
  "width": "100%",
1308
1301
  },
@@ -1313,9 +1306,8 @@ exports[`Failed text bubble test shows a WARNING SENT text bubble that is swipea
1313
1306
  },
1314
1307
  false,
1315
1308
  {
1316
- "backgroundColor": "#FEEFDB",
1309
+ "backgroundColor": "#FFD398",
1317
1310
  },
1318
- false,
1319
1311
  ],
1320
1312
  ]
1321
1313
  }
@@ -1345,9 +1337,6 @@ exports[`Failed text bubble test shows an ERROR RECEIVED text bubble that is swi
1345
1337
  },
1346
1338
  false,
1347
1339
  false,
1348
- {
1349
- "backgroundColor": "#F16868",
1350
- },
1351
1340
  {
1352
1341
  "borderBottomLeftRadius": 8,
1353
1342
  "borderBottomRightRadius": 32,
@@ -1487,7 +1476,7 @@ exports[`Failed text bubble test shows an ERROR RECEIVED text bubble that is swi
1487
1476
  }
1488
1477
  stroke={
1489
1478
  {
1490
- "payload": 4294695385,
1479
+ "payload": 4279837036,
1491
1480
  "type": 0,
1492
1481
  }
1493
1482
  }
@@ -1588,7 +1577,7 @@ exports[`Failed text bubble test shows an ERROR RECEIVED text bubble that is swi
1588
1577
  }
1589
1578
  stroke={
1590
1579
  {
1591
- "payload": 4294695385,
1580
+ "payload": 4279837036,
1592
1581
  "type": 0,
1593
1582
  }
1594
1583
  }
@@ -1634,7 +1623,7 @@ exports[`Failed text bubble test shows an ERROR RECEIVED text bubble that is swi
1634
1623
  },
1635
1624
  ],
1636
1625
  {
1637
- "color": "#FFFFFF",
1626
+ "color": "#1F2933",
1638
1627
  "textAlign": undefined,
1639
1628
  "width": "100%",
1640
1629
  },
@@ -1645,9 +1634,6 @@ exports[`Failed text bubble test shows an ERROR RECEIVED text bubble that is swi
1645
1634
  },
1646
1635
  false,
1647
1636
  false,
1648
- {
1649
- "backgroundColor": "#F16868",
1650
- },
1651
1637
  ],
1652
1638
  ]
1653
1639
  }
@@ -1677,9 +1663,6 @@ exports[`Failed text bubble test shows an ERROR SENT text bubble that is swipeab
1677
1663
  },
1678
1664
  false,
1679
1665
  false,
1680
- {
1681
- "backgroundColor": "#F16868",
1682
- },
1683
1666
  false,
1684
1667
  {
1685
1668
  "borderBottomLeftRadius": 32,
@@ -1819,7 +1802,7 @@ exports[`Failed text bubble test shows an ERROR SENT text bubble that is swipeab
1819
1802
  }
1820
1803
  stroke={
1821
1804
  {
1822
- "payload": 4294695385,
1805
+ "payload": 4279837036,
1823
1806
  "type": 0,
1824
1807
  }
1825
1808
  }
@@ -1920,7 +1903,7 @@ exports[`Failed text bubble test shows an ERROR SENT text bubble that is swipeab
1920
1903
  }
1921
1904
  stroke={
1922
1905
  {
1923
- "payload": 4294695385,
1906
+ "payload": 4279837036,
1924
1907
  "type": 0,
1925
1908
  }
1926
1909
  }
@@ -1966,7 +1949,7 @@ exports[`Failed text bubble test shows an ERROR SENT text bubble that is swipeab
1966
1949
  },
1967
1950
  ],
1968
1951
  {
1969
- "color": "#FFFFFF",
1952
+ "color": "#1F2933",
1970
1953
  "textAlign": undefined,
1971
1954
  "width": "100%",
1972
1955
  },
@@ -1977,9 +1960,6 @@ exports[`Failed text bubble test shows an ERROR SENT text bubble that is swipeab
1977
1960
  },
1978
1961
  false,
1979
1962
  false,
1980
- {
1981
- "backgroundColor": "#F16868",
1982
- },
1983
1963
  ],
1984
1964
  ]
1985
1965
  }
@@ -5,10 +5,10 @@ type FailedBubbleProps = {
5
5
  text: string;
6
6
  visualState: VisualState;
7
7
  bubbleAlignment: BubbleAlignment;
8
- onPressEdit: (id: string) => void;
9
- onPressDelete: (id: string) => void;
8
+ onPressEdit?: (id: string) => void;
9
+ onPressDelete?: (id: string) => void;
10
10
  };
11
- declare const SendTextBubble: ({
11
+ export declare const SendTextBubble: ({
12
12
  id,
13
13
  text,
14
14
  visualState,
@@ -16,4 +16,4 @@ declare const SendTextBubble: ({
16
16
  onPressEdit,
17
17
  onPressDelete,
18
18
  }: FailedBubbleProps) => JSX.Element;
19
- export {SendTextBubble};
19
+ export {};
@@ -16,11 +16,11 @@ type FailedBubbleProps = {
16
16
  text: string;
17
17
  visualState: VisualState;
18
18
  bubbleAlignment: BubbleAlignment;
19
- onPressEdit: (id: string) => void;
20
- onPressDelete: (id: string) => void;
19
+ onPressEdit?: (id: string) => void;
20
+ onPressDelete?: (id: string) => void;
21
21
  };
22
22
 
23
- const SendTextBubble = ({
23
+ export const SendTextBubble = ({
24
24
  id,
25
25
  text,
26
26
  visualState,
@@ -42,16 +42,12 @@ const SendTextBubble = ({
42
42
  ? context.colors.main['0']
43
43
  : visualState === VisualState.WARNING
44
44
  ? context.colors.ui.warning.dark
45
- : visualState === VisualState.ERROR
46
- ? context.colors.ui.error.xlight
47
45
  : null;
48
46
  }
49
47
 
50
48
  const textColorCheck = (visualState: VisualState) => {
51
49
  if (visualState === VisualState.DEFAULT) return context.colors.main['0'];
52
- else if (visualState === VisualState.WARNING)
53
- return context.colors.ui.warning.dark;
54
- else if (visualState === VisualState.ERROR) return context.colors.ui.white;
50
+ if (visualState === VisualState.WARNING) return context.colors.ui.black;
55
51
  };
56
52
 
57
53
  const RenderEditDeleteAction = (
@@ -66,16 +62,24 @@ const SendTextBubble = ({
66
62
 
67
63
  return (
68
64
  <View style={styles.swipedRow}>
69
- <Animated.View style={[styles.swipedIcon, {opacity}]}>
70
- <Pressable onPress={() => onPressEdit(id)} testID="edit-button">
71
- <Icon style={'regular'} name={'pencil'} color={iconColorCheck()} />
72
- </Pressable>
73
- </Animated.View>
74
- <Animated.View style={[styles.swipedIcon, {opacity}]}>
75
- <Pressable onPress={() => onPressDelete(id)} testID="delete-button">
76
- <Icon style={'regular'} name={'trash'} color={iconColorCheck()} />
77
- </Pressable>
78
- </Animated.View>
65
+ {onPressEdit && (
66
+ <Animated.View style={[styles.swipedIcon, {opacity}]}>
67
+ <Pressable onPress={() => onPressEdit(id)} testID="edit-button">
68
+ <Icon
69
+ style={'regular'}
70
+ name={'pencil'}
71
+ color={iconColorCheck()}
72
+ />
73
+ </Pressable>
74
+ </Animated.View>
75
+ )}
76
+ {onPressDelete && (
77
+ <Animated.View style={[styles.swipedIcon, {opacity}]}>
78
+ <Pressable onPress={() => onPressDelete(id)} testID="delete-button">
79
+ <Icon style={'regular'} name={'trash'} color={iconColorCheck()} />
80
+ </Pressable>
81
+ </Animated.View>
82
+ )}
79
83
  </View>
80
84
  );
81
85
  };
@@ -83,20 +87,27 @@ const SendTextBubble = ({
83
87
  return (
84
88
  <GestureHandlerRootView>
85
89
  <View style={styles.textBubbleContainer}>
86
- <Swipeable
87
- ref={swipeableRef}
88
- renderRightActions={RenderEditDeleteAction}
89
- >
90
+ {onPressDelete && onPressEdit ? (
91
+ <Swipeable
92
+ ref={swipeableRef}
93
+ renderRightActions={RenderEditDeleteAction}
94
+ >
95
+ <SmallText
96
+ textColor={textColorCheck(visualState)}
97
+ addStyle={styles.text}
98
+ >
99
+ {text}
100
+ </SmallText>
101
+ </Swipeable>
102
+ ) : (
90
103
  <SmallText
91
104
  textColor={textColorCheck(visualState)}
92
105
  addStyle={styles.text}
93
106
  >
94
107
  {text}
95
108
  </SmallText>
96
- </Swipeable>
109
+ )}
97
110
  </View>
98
111
  </GestureHandlerRootView>
99
112
  );
100
113
  };
101
-
102
- export {SendTextBubble};
@@ -48,17 +48,14 @@ export function Stylesheet(
48
48
  )[];
49
49
  text: (
50
50
  | {
51
- textAlignVertical: string;
52
- fontFamily: string;
53
- fontSize: number;
54
- lineHeight: number;
55
51
  minHeight: number;
52
+ textAlignVertical: string;
56
53
  backgroundColor?: undefined;
57
- color?: undefined;
58
54
  }
59
55
  | {
60
56
  backgroundColor: any;
61
- color: any;
57
+ minHeight?: undefined;
58
+ textAlignVertical?: undefined;
62
59
  }
63
60
  )[];
64
61
  swipedIcon: {
@@ -72,4 +69,4 @@ export function Stylesheet(
72
69
  justifyContent: 'space-evenly';
73
70
  };
74
71
  }>;
75
- import {StyleSheet} from 'react-native';
72
+ import {StyleSheet} from 'react-native/Libraries/StyleSheet/StyleSheet';
@@ -20,10 +20,7 @@ export const Stylesheet = (context, visualState, bubbleAlignment) =>
20
20
  backgroundColor: context.colors.main['9'],
21
21
  },
22
22
  visualState === VisualState.WARNING && {
23
- backgroundColor: context.colors.ui.warning.xlight,
24
- },
25
- visualState === VisualState.ERROR && {
26
- backgroundColor: context.colors.ui.error.default,
23
+ backgroundColor: context.colors.ui.warning.light,
27
24
  },
28
25
  bubbleAlignment === BubbleAlignment.RECEIVE && {
29
26
  borderBottomLeftRadius: Scale.xs,
@@ -43,10 +40,7 @@ export const Stylesheet = (context, visualState, bubbleAlignment) =>
43
40
  backgroundColor: context.colors.main['9'],
44
41
  },
45
42
  visualState === VisualState.WARNING && {
46
- backgroundColor: context.colors.ui.warning.xlight,
47
- },
48
- visualState === VisualState.ERROR && {
49
- backgroundColor: context.colors.ui.error.default,
43
+ backgroundColor: context.colors.ui.warning.light,
50
44
  },
51
45
  ],
52
46
  swipedIcon: {
@@ -15,7 +15,7 @@ exports[`Timeline visual test renders a check-in time and check-out time 1`] = `
15
15
  {
16
16
  "backgroundColor": "#E5E8EB",
17
17
  "borderRadius": 50,
18
- "height": 8,
18
+ "height": 16,
19
19
  "overflow": "hidden",
20
20
  }
21
21
  }
@@ -41,7 +41,7 @@ exports[`Timeline visual test renders a check-in time and check-out time 1`] = `
41
41
  style={
42
42
  {
43
43
  "borderRadius": 50,
44
- "height": 8,
44
+ "height": "100%",
45
45
  "left": "10%",
46
46
  "width": "33.333333333333336%",
47
47
  }
@@ -142,7 +142,7 @@ exports[`Timeline visual test renders a check-in time with no known check-out ti
142
142
  {
143
143
  "backgroundColor": "#E5E8EB",
144
144
  "borderRadius": 50,
145
- "height": 8,
145
+ "height": 16,
146
146
  "overflow": "hidden",
147
147
  }
148
148
  }
@@ -168,7 +168,7 @@ exports[`Timeline visual test renders a check-in time with no known check-out ti
168
168
  style={
169
169
  {
170
170
  "borderRadius": 50,
171
- "height": 8,
171
+ "height": "100%",
172
172
  "left": "10%",
173
173
  "width": "25%",
174
174
  }
@@ -17,7 +17,7 @@ export function Stylesheet(
17
17
  overflow: 'hidden';
18
18
  };
19
19
  checkInLine: {
20
- height: number;
20
+ height: string;
21
21
  width: string;
22
22
  borderRadius: number;
23
23
  left: string;
@@ -9,13 +9,13 @@ export const Stylesheet = (context, startingPosition, width) =>
9
9
  marginBottom: Scale.xs,
10
10
  },
11
11
  lineContainer: {
12
- height: Scale.xs,
12
+ height: Scale.m,
13
13
  borderRadius: 50,
14
14
  backgroundColor: context.colors.ui.lightgrey,
15
15
  overflow: 'hidden',
16
16
  },
17
17
  checkInLine: {
18
- height: Scale.xs,
18
+ height: '100%',
19
19
  width: width.toString() + '%',
20
20
  borderRadius: 50,
21
21
  left: startingPosition.toString() + '%',
@@ -22,6 +22,7 @@ exports[`Timestamp component test Renders a timestamp component, this will be ad
22
22
  ]
23
23
  }
24
24
  >
25
- 9:08
25
+
26
+ 25 May, 9:08
26
27
  </Text>
27
28
  `;
@@ -1,6 +1,7 @@
1
1
  import {ToddleDateTime} from '../../../utilities/toddle-datetime/toddle-datetime.class';
2
2
  type TimestampProps = {
3
3
  sent: ToddleDateTime;
4
+ label?: string;
4
5
  };
5
- export declare const Timestamp: ({sent}: TimestampProps) => JSX.Element;
6
+ export declare const Timestamp: ({sent, label}: TimestampProps) => JSX.Element;
6
7
  export {};
@@ -7,18 +7,15 @@ import {SmallText} from '../../atoms/paragraph-components';
7
7
 
8
8
  type TimestampProps = {
9
9
  sent: ToddleDateTime;
10
+ label?: string;
10
11
  };
11
12
 
12
- export const Timestamp = ({sent}: TimestampProps) => {
13
+ export const Timestamp = ({sent, label}: TimestampProps) => {
13
14
  const Context = useContext(ThemeCtx);
14
15
  const styles = Stylesheet();
15
16
 
16
17
  const timestampToStringHandler = (timestamp: ToddleDateTime) => {
17
- return timestamp.toLocaleString({
18
- hourCycle: 'h24',
19
- hour: 'numeric',
20
- minute: '2-digit',
21
- });
18
+ return timestamp.toFormat('d LLL, H:mm');
22
19
  };
23
20
 
24
21
  return (
@@ -27,7 +24,7 @@ export const Timestamp = ({sent}: TimestampProps) => {
27
24
  textAlign={'right'}
28
25
  addStyle={styles.timestampText}
29
26
  >
30
- {timestampToStringHandler(sent)}
27
+ {label} {timestampToStringHandler(sent)}
31
28
  </SmallText>
32
29
  );
33
30
  };