@hoddy-ui/core 1.0.43 → 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 +1 -1
- package/src/Components/TextField.tsx +16 -3
package/package.json
CHANGED
|
@@ -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
|
-
|
|
412
|
-
{
|
|
413
|
-
|
|
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}
|