@hoddy-ui/core 1.0.16 → 1.0.18
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/index.ts +2 -0
- package/package.json +1 -1
- package/src/Components/Animator.tsx +1 -3
- package/src/Components/TextField.tsx +4 -1
- package/src/types.ts +1 -1
package/index.ts
CHANGED
|
@@ -3,11 +3,13 @@ import { initialize } from "./src/config";
|
|
|
3
3
|
// Components
|
|
4
4
|
export { default as AdaptiveStatusBar } from "./src/Components/AdaptiveStatusBar";
|
|
5
5
|
export { default as AlertX } from "./src/Components/AlertX";
|
|
6
|
+
export * from "./src/Components/Animator";
|
|
6
7
|
export { default as Avatar } from "./src/Components/Avatar";
|
|
7
8
|
export * from "./src/Components/Button";
|
|
8
9
|
export { default as Button } from "./src/Components/Button";
|
|
9
10
|
export * from "./src/Components/Checkbox";
|
|
10
11
|
export * from "./src/Components/FlashMessage";
|
|
12
|
+
export * from "./src/Components/FormWrapper";
|
|
11
13
|
export * from "./src/Components/Grid";
|
|
12
14
|
export * from "./src/Components/Locator";
|
|
13
15
|
export * from "./src/Components/Popup";
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { LayoutAnimation, View } from "react-native";
|
|
|
4
4
|
import { ScaledSheet } from "react-native-size-matters";
|
|
5
5
|
import { AnimatorProps } from "../types";
|
|
6
6
|
|
|
7
|
-
const Animator: FC<AnimatorProps> = ({
|
|
7
|
+
export const Animator: FC<AnimatorProps> = ({
|
|
8
8
|
style = {},
|
|
9
9
|
duration = 500,
|
|
10
10
|
children,
|
|
@@ -41,5 +41,3 @@ const Animator: FC<AnimatorProps> = ({
|
|
|
41
41
|
);
|
|
42
42
|
return <View style={styles.root}>{play && children}</View>;
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
export default Animator;
|
|
@@ -26,6 +26,7 @@ const TextField: React.FC<TextFieldProps> = ({
|
|
|
26
26
|
onBlur = () => {},
|
|
27
27
|
error,
|
|
28
28
|
start,
|
|
29
|
+
size = "normal",
|
|
29
30
|
rounded,
|
|
30
31
|
disabled = false,
|
|
31
32
|
style = {},
|
|
@@ -40,7 +41,9 @@ const TextField: React.FC<TextFieldProps> = ({
|
|
|
40
41
|
|
|
41
42
|
const labelAnim = useRef(new Animated.Value(0)).current;
|
|
42
43
|
|
|
43
|
-
const height =
|
|
44
|
+
const height =
|
|
45
|
+
moderateScale(variant === "text" ? 50 : 45) *
|
|
46
|
+
(size === "large" ? 1.2 : size === "small" ? 0.8 : 1);
|
|
44
47
|
|
|
45
48
|
React.useEffect(() => {
|
|
46
49
|
if (focused || value) {
|
package/src/types.ts
CHANGED
|
@@ -17,7 +17,6 @@ export type colorTypes =
|
|
|
17
17
|
| "info"
|
|
18
18
|
| "warning"
|
|
19
19
|
| "error"
|
|
20
|
-
| "purple"
|
|
21
20
|
| "blue"
|
|
22
21
|
| "textSecondary";
|
|
23
22
|
|
|
@@ -215,6 +214,7 @@ export interface TextFieldProps extends TextInputProps {
|
|
|
215
214
|
label?: string;
|
|
216
215
|
variant?: "outlined" | "text" | "contained";
|
|
217
216
|
color?: colorTypes;
|
|
217
|
+
size?: "small" | "normal" | "large";
|
|
218
218
|
type?: "email" | "tel" | "password" | "text" | "number" | "search";
|
|
219
219
|
helperText?: string;
|
|
220
220
|
value: any;
|