dhre-ui-kit 0.0.18 → 0.0.19

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": "dhre-ui-kit",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "main": "src/index.ts",
5
5
  "files": [
6
6
  "src",
@@ -5,6 +5,7 @@ import {
5
5
  View,
6
6
  ViewStyle,
7
7
  StyleProp,
8
+ TextStyle,
8
9
  } from 'react-native';
9
10
  import {SvgProps} from 'react-native-svg';
10
11
  import CustomText from '../customText';
@@ -13,7 +14,7 @@ interface CustomButtonProps {
13
14
  title: string;
14
15
  onPress: () => void;
15
16
  containerStyle?: StyleProp<ViewStyle>;
16
- textStyle?: ViewStyle;
17
+ textStyle?: TextStyle;
17
18
  leftIcon?: ReactElement<SvgProps>;
18
19
  rightIcon?: ReactElement<SvgProps>;
19
20
  iconStyle?: ViewStyle;
@@ -1,3 +1,5 @@
1
+ import {TextStyle, ViewStyle} from 'react-native';
2
+
1
3
  export interface CheckBoxProps {
2
4
  isChecked: boolean;
3
5
  onCheck?: (checked: boolean) => void;
@@ -7,4 +9,7 @@ export interface CheckBoxProps {
7
9
  testID?: string;
8
10
  checkedIcon: React.ReactElement;
9
11
  uncheckedIcon: React.ReactElement;
12
+ titleVariant?: string;
13
+ titleStyle?: TextStyle;
14
+ containerStyle?: ViewStyle;
10
15
  }
@@ -12,6 +12,9 @@ const Checkbox: React.FC<CheckBoxProps> = ({
12
12
  testID,
13
13
  checkedIcon,
14
14
  uncheckedIcon,
15
+ titleVariant = 'L1_REGULAR',
16
+ titleStyle,
17
+ containerStyle,
15
18
  }) => {
16
19
  const [checked, setChecked] = useState(isChecked || false);
17
20
 
@@ -21,7 +24,7 @@ const Checkbox: React.FC<CheckBoxProps> = ({
21
24
  };
22
25
 
23
26
  return (
24
- <View testID={testID}>
27
+ <View testID={testID} style={containerStyle}>
25
28
  <Pressable
26
29
  testID={'Checkbox-Press'}
27
30
  onPress={handlePress}
@@ -33,7 +36,11 @@ const Checkbox: React.FC<CheckBoxProps> = ({
33
36
  <View style={styles.checkboxContainer}>
34
37
  {React.cloneElement(checked ? checkedIcon : uncheckedIcon)}
35
38
  </View>
36
- <CustomTypography variant="H8medium" text={labelName} />
39
+ <CustomTypography
40
+ variant={titleVariant}
41
+ text={labelName}
42
+ style={titleStyle}
43
+ />
37
44
  </Pressable>
38
45
  </View>
39
46
  );