@tactics/toddle-styleguide 1.7.13 → 1.7.14
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,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
type InfoProps = {
|
|
3
|
-
label
|
|
3
|
+
label?: string;
|
|
4
4
|
description: string;
|
|
5
|
+
active?: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare const Info: ({ label, description }: InfoProps) => React.JSX.Element;
|
|
7
|
+
declare const Info: ({ label, description, active }: InfoProps) => React.JSX.Element;
|
|
7
8
|
export { Info as Info };
|
|
@@ -8,20 +8,21 @@ import {Heading3} from '../../atoms/heading-components';
|
|
|
8
8
|
import {SmallText} from '../../atoms/paragraph-components';
|
|
9
9
|
|
|
10
10
|
type InfoProps = {
|
|
11
|
-
label
|
|
11
|
+
label?: string;
|
|
12
12
|
description: string;
|
|
13
|
+
active?: boolean
|
|
13
14
|
};
|
|
14
15
|
|
|
15
|
-
const Info = ({label, description}: InfoProps) => {
|
|
16
|
+
const Info = ({label, description, active}: InfoProps) => {
|
|
16
17
|
const context = useContext(ThemeCtx);
|
|
17
18
|
const styles = Stylesheet(context);
|
|
18
19
|
|
|
19
20
|
return (
|
|
20
21
|
<View style={styles.container}>
|
|
21
|
-
<Heading3 bold={true} addStyle={styles.label}>
|
|
22
|
+
{label && <Heading3 bold={true} addStyle={styles.label}>
|
|
22
23
|
{label}
|
|
23
|
-
</Heading3>
|
|
24
|
-
<SmallText textColor={context.colors.ui.darkgrey}>
|
|
24
|
+
</Heading3>}
|
|
25
|
+
<SmallText textColor={active !== undefined && active === false ? context.colors.ui.grey : context.colors.ui.darkgrey}>
|
|
25
26
|
{description}
|
|
26
27
|
</SmallText>
|
|
27
28
|
</View>
|
|
@@ -10,12 +10,20 @@ export const InfoPreview = ({}: {}) => {
|
|
|
10
10
|
alignItems: 'center',
|
|
11
11
|
justifyContent: 'center',
|
|
12
12
|
backgroundColor: 'white',
|
|
13
|
+
gap: 16,
|
|
13
14
|
}}
|
|
14
15
|
>
|
|
15
16
|
<Info
|
|
16
17
|
label={'Mijn Gezin'}
|
|
17
18
|
description={'Volg hier de dag van uw kinderen'}
|
|
18
19
|
/>
|
|
20
|
+
<Info
|
|
21
|
+
description={'Luca was heel de dag wat flauw en voelde zich niet lekker. Mama is haar vroeger komen halen.'}
|
|
22
|
+
/>
|
|
23
|
+
<Info
|
|
24
|
+
active={false}
|
|
25
|
+
description={'Geen opmerking voor deze dag.'}
|
|
26
|
+
/>
|
|
19
27
|
</View>
|
|
20
28
|
);
|
|
21
29
|
};
|