@hoddy-ui/core 1.0.42 → 1.0.44

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.42",
3
+ "version": "1.0.44",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -17,6 +17,7 @@
17
17
  "@types/react-native": "^0.72.0",
18
18
  "react": "^18.2.0",
19
19
  "react-native": ">=0.71.8",
20
+ "react-native-safe-area-context": ">=4.5.3",
20
21
  "typescript": "^5.0.4"
21
22
  },
22
23
  "keywords": [
@@ -32,7 +33,6 @@
32
33
  "expo-location": "^15.1.1",
33
34
  "expo-navigation-bar": "^2.1.1",
34
35
  "expo-system-ui": "^2.2.1",
35
- "react-native-safe-area-context": ">=4.5.3",
36
36
  "react-native-size-matters": "^0.4.0"
37
37
  },
38
38
  "publishConfig": {
@@ -276,6 +276,7 @@ export const TextField2: React.FC<TextFieldProps> = ({
276
276
  style = {},
277
277
  inputStyles = {},
278
278
  gutterBottom = 8,
279
+ placeholder,
279
280
  end,
280
281
  options,
281
282
  ...props
@@ -343,6 +344,11 @@ export const TextField2: React.FC<TextFieldProps> = ({
343
344
  color: colors.dark.light,
344
345
  paddingLeft: moderateScale(10),
345
346
  },
347
+ placeholder: {
348
+ fontSize: "14@ms",
349
+ color: colors.textSecondary.main,
350
+ paddingLeft: moderateScale(10),
351
+ },
346
352
  label: {},
347
353
  helperText: {
348
354
  paddingHorizontal: "15@s",
@@ -408,9 +414,15 @@ export const TextField2: React.FC<TextFieldProps> = ({
408
414
 
409
415
  {options ? (
410
416
  <>
411
- <Typography style={styles.inputText}>
412
- {options.find((cur) => cur.value === value)?.label}
413
- </Typography>
417
+ {value ? (
418
+ <Typography style={styles.inputText}>
419
+ {options.find((cur) => cur.value === value)?.label}
420
+ </Typography>
421
+ ) : (
422
+ <Typography style={styles.placeholder}>
423
+ {placeholder}
424
+ </Typography>
425
+ )}
414
426
  <Ionicons
415
427
  name="chevron-down"
416
428
  size={24}
@@ -433,6 +445,7 @@ export const TextField2: React.FC<TextFieldProps> = ({
433
445
  keyboardType={keyboardType}
434
446
  placeholderTextColor={colors.textSecondary.main}
435
447
  editable={!disabled}
448
+ placeholder={placeholder}
436
449
  selectTextOnFocus={!disabled}
437
450
  onSubmitEditing={onSubmitEditing}
438
451
  {...formProps}