@tactics/toddle-styleguide 1.4.13 → 1.4.15
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/calendar/__snapshots__/calendar.test.js.snap +643 -1823
- package/src/components/molecules/context-label/context-label.component.tsx +24 -16
- package/src/components/molecules/context-label/context-label.preview.tsx +3 -3
- package/src/components/molecules/time-picker/__snapshots__/time-picker.test.js.snap +2 -2
- package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +2 -0
|
@@ -5,27 +5,35 @@ import {View} from 'react-native';
|
|
|
5
5
|
import {ThemeCtx} from '../../../context/theme.context';
|
|
6
6
|
import {Stylesheet} from './context-label.styles';
|
|
7
7
|
import {Paragraph} from '../../atoms/paragraph-components';
|
|
8
|
+
import {LoadingIndicator} from "../../organisms/loading-indicator/loading-indicator.component";
|
|
8
9
|
|
|
9
10
|
type ContextLabelProps = {
|
|
10
|
-
|
|
11
|
+
label: string;
|
|
12
|
+
isLoading: boolean
|
|
11
13
|
};
|
|
12
14
|
|
|
13
|
-
const ContextLabel = ({label}: ContextLabelProps) => {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
const ContextLabel = ({label, isLoading}: ContextLabelProps) => {
|
|
16
|
+
const context = useContext(ThemeCtx);
|
|
17
|
+
const styles = Stylesheet(context);
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
return (
|
|
20
|
+
<View style={styles.container}>
|
|
21
|
+
{
|
|
22
|
+
(isLoading ?
|
|
23
|
+
<LoadingIndicator size={4} color={context.colors.ui.grey} />
|
|
24
|
+
:
|
|
25
|
+
<Paragraph
|
|
26
|
+
bold={true}
|
|
27
|
+
textAlign={'center'}
|
|
28
|
+
ellipsizeMode={'tail'}
|
|
29
|
+
numberOfLines={1}
|
|
30
|
+
>
|
|
31
|
+
{label}
|
|
32
|
+
</Paragraph>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
</View>
|
|
36
|
+
);
|
|
29
37
|
};
|
|
30
38
|
|
|
31
39
|
export {ContextLabel as ContextLabel};
|
|
@@ -17,7 +17,7 @@ export const ContextLabelPreview = ({}: {}) => {
|
|
|
17
17
|
backgroundColor: 'white',
|
|
18
18
|
}}
|
|
19
19
|
>
|
|
20
|
-
<ContextLabel label='Dirk Dingles' />
|
|
20
|
+
<ContextLabel isLoading={false} label='Dirk Dingles' />
|
|
21
21
|
|
|
22
22
|
<View
|
|
23
23
|
style={{
|
|
@@ -30,7 +30,7 @@ export const ContextLabelPreview = ({}: {}) => {
|
|
|
30
30
|
}}
|
|
31
31
|
>
|
|
32
32
|
<Avatar size={Size.SMALL} source={Initials.for('Dirk', 'Dingles')} />
|
|
33
|
-
<ContextLabel label='Dirk Dingles' />
|
|
33
|
+
<ContextLabel isLoading={false} label='Dirk Dingles' />
|
|
34
34
|
</View>
|
|
35
35
|
|
|
36
36
|
<View
|
|
@@ -47,7 +47,7 @@ export const ContextLabelPreview = ({}: {}) => {
|
|
|
47
47
|
<View style={{width: '100%'}}><Paragraph>Toddle Logo</Paragraph></View>
|
|
48
48
|
<View style={{ flexWrap: 'nowrap', flexDirection: 'row', alignItems: 'center', gap: Scale.xs,}}>
|
|
49
49
|
<Avatar size={Size.SMALL} source={Initials.for('Dirk', 'DingleslangereNaam')} />
|
|
50
|
-
<ContextLabel label='Dirk DingleslangereNaamMaarDanEchtSuperLang' />
|
|
50
|
+
<ContextLabel isLoading={false} label='Dirk DingleslangereNaamMaarDanEchtSuperLang' />
|
|
51
51
|
</View>
|
|
52
52
|
</View>
|
|
53
53
|
</View>
|
|
@@ -47,7 +47,7 @@ exports[`Time picker test Should render a time picker where we can choose the ho
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"label": "--",
|
|
50
|
-
"value": "
|
|
50
|
+
"value": "",
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"label": "00",
|
|
@@ -1093,7 +1093,7 @@ exports[`Time picker test Should render a time picker where we can choose the ho
|
|
|
1093
1093
|
},
|
|
1094
1094
|
{
|
|
1095
1095
|
"label": "--",
|
|
1096
|
-
"value": "
|
|
1096
|
+
"value": "",
|
|
1097
1097
|
},
|
|
1098
1098
|
{
|
|
1099
1099
|
"label": "00",
|
|
@@ -366,6 +366,7 @@ exports[`test child list item component arrow appears when selectable is false 1
|
|
|
366
366
|
"flexDirection": "row",
|
|
367
367
|
"flexWrap": "wrap",
|
|
368
368
|
"gap": 12,
|
|
369
|
+
"marginBottom": 8,
|
|
369
370
|
"marginLeft": 96,
|
|
370
371
|
}
|
|
371
372
|
}
|
|
@@ -961,6 +962,7 @@ exports[`test child list item component make text that is too long end in ... an
|
|
|
961
962
|
"flexDirection": "row",
|
|
962
963
|
"flexWrap": "wrap",
|
|
963
964
|
"gap": 12,
|
|
965
|
+
"marginBottom": 8,
|
|
964
966
|
"marginLeft": 96,
|
|
965
967
|
}
|
|
966
968
|
}
|