@tactics/toddle-styleguide 1.4.12 → 1.4.13

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tactics/toddle-styleguide",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
4
4
  "main": "index.tsx",
5
5
  "types": "index.d.ts",
6
6
  "prepublish": "tsc",
@@ -15,11 +15,11 @@ interface TimePickerProps {
15
15
  }
16
16
 
17
17
  const HOURS: string[] = [
18
- '--',
18
+ '',
19
19
  ...Array.from({length: 24}, (_, i) => i.toString().padStart(2, '0')),
20
20
  ];
21
21
  const MINUTES: string[] = [
22
- '--',
22
+ '',
23
23
  ...Array.from({length: 60}, (_, i) => i.toString().padStart(2, '0')),
24
24
  ];
25
25
 
@@ -40,8 +40,8 @@ export const TimePicker = ({
40
40
  <View style={styles.rootContainer}>
41
41
  <View style={styles.container}>
42
42
  <WheelPickerExpo
43
- items={HOURS.map((value) => ({label: value, value: value}))}
44
- onChange={({item}) => onChangeHours(item.label)}
43
+ items={HOURS.map((value) => ({label: value == '' ? '--' : value, value: value}))}
44
+ onChange={({item}) => onChangeHours(item.value)}
45
45
  width={Scale.m * 4.5}
46
46
  height={320}
47
47
  backgroundColor={context.colors.ui.xlightgrey}
@@ -69,8 +69,8 @@ export const TimePicker = ({
69
69
  </View>
70
70
  <View style={styles.container}>
71
71
  <WheelPickerExpo
72
- items={MINUTES.map((value) => ({label: value, value: value}))}
73
- onChange={({item}) => onChangeMinutes(item.label)}
72
+ items={MINUTES.map((value) => ({label: value == '' ? '--' : value, value: value}))}
73
+ onChange={({item}) => onChangeMinutes(item.value)}
74
74
  width={Scale.m * 4.5}
75
75
  height={320}
76
76
  backgroundColor={context.colors.ui.xlightgrey}
@@ -51,7 +51,7 @@ export const TimetableEdit = ({
51
51
  >Van</Heading3>
52
52
  <Tag
53
53
  value={TimetableEditState.IN}
54
- label={`${initialInHours}:${initialInMinutes}`}
54
+ label={`${initialInHours == '' ? '--' : initialInHours}:${initialInMinutes == '' ? '--' : initialInMinutes}`}
55
55
  isSelected={editState == TimetableEditState.IN}
56
56
  onPress={updateEditState}
57
57
  />
@@ -63,7 +63,7 @@ export const TimetableEdit = ({
63
63
  >Tot</Heading3>
64
64
  <Tag
65
65
  value={TimetableEditState.OUT}
66
- label={`${initialOutHours}:${initialOutMinutes}`}
66
+ label={`${initialOutHours == '' ? '--' : initialOutHours}:${initialOutMinutes == '' ? '--' : initialOutMinutes}`}
67
67
  isSelected={editState == TimetableEditState.OUT}
68
68
  onPress={updateEditState}
69
69
  />
@@ -10,8 +10,8 @@ export const TimetableEditPreview = ({}: {}) => {
10
10
  const [checkInHours, setCheckInHours] = useState('09');
11
11
  const [checkInMinutes, setCheckInMinutes] = useState('06');
12
12
 
13
- const [checkOutHours, setCheckOutHours] = useState('--');
14
- const [checkOutMinutes, setCheckOutMinutes] = useState('--');
13
+ const [checkOutHours, setCheckOutHours] = useState('');
14
+ const [checkOutMinutes, setCheckOutMinutes] = useState('');
15
15
 
16
16
  console.log(`
17
17
  Check In: