@korsolutions/ui 0.0.1 → 0.0.2
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,22 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@korsolutions/ui",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"main": "index.ts",
|
|
6
|
-
"types": "index.ts",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"main": ".src/index.ts",
|
|
6
|
+
"types": ".src/index.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./src/index.ts"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
+
"publish": "npm publish --access public",
|
|
11
12
|
"ts-check": "tsc --noEmit"
|
|
12
13
|
},
|
|
13
14
|
"peerDependencies": {
|
|
14
15
|
"react": "*",
|
|
15
16
|
"react-native": "*",
|
|
16
|
-
"react-native-reanimated": "4.x",
|
|
17
17
|
"react-native-web": "*"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/react": "^19.2.3"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/KorSoftwareSolutions/ui"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/KorSoftwareSolutions/ui/issues"
|
|
21
28
|
}
|
|
22
|
-
}
|
|
29
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { useField } from "./context";
|
|
3
|
-
import
|
|
3
|
+
import { Text, TextProps } from "react-native";
|
|
4
4
|
|
|
5
5
|
export interface FieldLabelProps {
|
|
6
6
|
children: string;
|
|
7
|
-
style?:
|
|
7
|
+
style?: TextProps["style"];
|
|
8
8
|
render?: (props: FieldLabelProps) => React.ReactNode;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -12,5 +12,5 @@ export function FieldLabel(props: FieldLabelProps) {
|
|
|
12
12
|
const field = useField();
|
|
13
13
|
const calculatedStyle = [field.styles?.label?.default, field.styles?.label?.[field.state], props.style];
|
|
14
14
|
|
|
15
|
-
return props.render ? props.render(props) : <
|
|
15
|
+
return props.render ? props.render(props) : <Text style={calculatedStyle}>{props.children}</Text>;
|
|
16
16
|
}
|