@hoddy-ui/core 1.0.20 → 1.0.22

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": "@hoddy-ui/core",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -1,19 +1,14 @@
1
- import {
2
- Pressable,
3
- StyleSheet,
4
- Text,
5
- TouchableOpacity,
6
- View,
7
- } from "react-native";
8
- import React, { FC } from "react";
9
1
  import { MaterialCommunityIcons } from "@expo/vector-icons";
2
+ import React, { FC } from "react";
3
+ import { TouchableOpacity, View } from "react-native";
4
+ import { ScaledSheet } from "react-native-size-matters";
10
5
  import { useColors } from "../hooks";
11
6
  import { CheckboxProps } from "../types";
12
- import { ScaledSheet } from "react-native-size-matters";
13
7
 
14
- const CheckBox: FC<CheckboxProps> = ({
8
+ export const CheckBox: FC<CheckboxProps> = ({
15
9
  color = "primary",
16
10
  checked,
11
+ size = 24,
17
12
  label,
18
13
  style = {},
19
14
  onChange,
@@ -27,12 +22,6 @@ const CheckBox: FC<CheckboxProps> = ({
27
22
  flexDirection: "row",
28
23
  ...style,
29
24
  },
30
- title: {
31
- fontSize: 16,
32
- color: "#000",
33
- marginLeft: 5,
34
- fontWeight: "600",
35
- },
36
25
  });
37
26
 
38
27
  return (
@@ -40,7 +29,7 @@ const CheckBox: FC<CheckboxProps> = ({
40
29
  <TouchableOpacity onPress={onChange}>
41
30
  <MaterialCommunityIcons
42
31
  name={iconName}
43
- size={24}
32
+ size={size}
44
33
  color={colors[color].main}
45
34
  />
46
35
  </TouchableOpacity>
@@ -48,5 +37,3 @@ const CheckBox: FC<CheckboxProps> = ({
48
37
  </View>
49
38
  );
50
39
  };
51
-
52
- export default CheckBox;
package/src/types.ts CHANGED
@@ -102,7 +102,8 @@ export interface ButtonProps {
102
102
 
103
103
  export interface CheckboxProps {
104
104
  color?: colorTypes;
105
- label: ReactNode;
105
+ label?: ReactNode;
106
+ size: number;
106
107
  checked?: boolean;
107
108
  style?: ViewStyle;
108
109
  onChange?: () => void;