@widergy/mobile-ui 1.40.4 → 1.41.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.41.0](https://github.com/widergy/mobile-ui/compare/v1.40.4...v1.41.0) (2025-04-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* checkbox field label updates ([#427](https://github.com/widergy/mobile-ui/issues/427)) ([bbfcfa7](https://github.com/widergy/mobile-ui/commit/bbfcfa720361e882df5a012405172099b13a11c6))
|
|
7
|
+
|
|
1
8
|
## [1.40.4](https://github.com/widergy/mobile-ui/compare/v1.40.3...v1.40.4) (2025-04-21)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -13,6 +13,7 @@ import { retrieveStyle } from './theme';
|
|
|
13
13
|
import styles from './styles';
|
|
14
14
|
|
|
15
15
|
const UTCheckBox = ({
|
|
16
|
+
CustomTitleComponent,
|
|
16
17
|
disabled,
|
|
17
18
|
error,
|
|
18
19
|
indeterminate,
|
|
@@ -92,6 +93,7 @@ const UTCheckBox = ({
|
|
|
92
93
|
|
|
93
94
|
<UTFieldLabel
|
|
94
95
|
colorTheme={shouldHighlightLabel ? 'accent' : 'dark'}
|
|
96
|
+
CustomTitleComponent={CustomTitleComponent}
|
|
95
97
|
required={required}
|
|
96
98
|
style={titleStyles}
|
|
97
99
|
withMarkdown={withMarkdown}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { bool, string } from 'prop-types';
|
|
2
|
+
import { bool, elementType, string } from 'prop-types';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import UTLabel from '../UTLabel';
|
|
@@ -7,21 +7,36 @@ import UTLabel from '../UTLabel';
|
|
|
7
7
|
import { REQUIRED_LABEL } from './constants';
|
|
8
8
|
import styles from './styles';
|
|
9
9
|
|
|
10
|
-
const UTFieldLabel = ({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
const UTFieldLabel = ({
|
|
11
|
+
children,
|
|
12
|
+
colorTheme,
|
|
13
|
+
CustomTitleComponent,
|
|
14
|
+
required,
|
|
15
|
+
style,
|
|
16
|
+
variant,
|
|
17
|
+
weight,
|
|
18
|
+
withMarkdown = true
|
|
19
|
+
}) => {
|
|
20
|
+
const Title = CustomTitleComponent || UTLabel;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<View style={[styles.label, style]}>
|
|
24
|
+
<Title colorTheme={colorTheme} variant={variant} weight={weight} withMarkdown={withMarkdown}>
|
|
25
|
+
{children}
|
|
26
|
+
</Title>
|
|
27
|
+
|
|
28
|
+
{required && (
|
|
29
|
+
<UTLabel colorTheme="error" shade="04" variant={variant} weight={weight}>
|
|
30
|
+
{REQUIRED_LABEL}
|
|
31
|
+
</UTLabel>
|
|
32
|
+
)}
|
|
33
|
+
</View>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
22
36
|
|
|
23
37
|
UTFieldLabel.propTypes = {
|
|
24
38
|
colorTheme: string,
|
|
39
|
+
CustomTitleComponent: elementType,
|
|
25
40
|
required: bool,
|
|
26
41
|
variant: string,
|
|
27
42
|
weight: string,
|
package/package.json
CHANGED