Fix input colors in dark mode

This commit is contained in:
Abhay Raizada
2024-03-22 07:00:38 +05:30
parent db290cd5dc
commit 23c4107763
2 changed files with 19 additions and 14 deletions

View File

@@ -21,11 +21,14 @@ export const InputFiller: React.FC<InputFillerProps> = ({
const handleInputChange = ( const handleInputChange = (
e: any e: any
) => { ) => {
setInputValue(e.target.value) console.log("E is", e)
setInputValue(e.target.value);
onChange(e.target.value)
}; };
const handleValueChange = (value: string | null) => { const handleValueChange = (value: string) => {
if (!value) return; if (!value) return;
setInputValue(value)
onChange(value); onChange(value);
}; };
@@ -41,19 +44,21 @@ export const InputFiller: React.FC<InputFillerProps> = ({
[AnswerTypes.label]: <></>, [AnswerTypes.label]: <></>,
[AnswerTypes.shortText]: ( [AnswerTypes.shortText]: (
<InputItem <InputItem
onChange={handleInputChange} onChange={handleValueChange}
defaultValue={defaultValue as string} defaultValue={defaultValue as string}
placeholder="enter a value..."> placeholder="enter a value..."
</InputItem> placeholderTextColor="#aaaaaa">
</InputItem>
), ),
[AnswerTypes.paragraph]: ( [AnswerTypes.paragraph]: (
<TextareaItem <TextareaItem
rows={10} rows={10}
placeholder="enter a value.." placeholder="enter a value.."
onChange={handleInputChange} placeholderTextColor="#aaaaaa"
autoHeight onChange={handleInputChange}
style={{ paddingVertical: 5 }} autoHeight
/> style={{ paddingVertical: 5 }}
/>
), ),
[AnswerTypes.number]: ( [AnswerTypes.number]: (
// <InputNumber // <InputNumber
@@ -84,7 +89,7 @@ export const InputFiller: React.FC<InputFillerProps> = ({
), ),
[AnswerTypes.dropdown]: ( [AnswerTypes.dropdown]: (
<RNPickerSelect <RNPickerSelect
onValueChange={(value) => { setInputValue(value), console.log("selected value is: ", value)}} onValueChange={handleValueChange}
items={dropdownItems} items={dropdownItems}
placeholder={{}} placeholder={{}}
key="picker" key="picker"

View File

@@ -96,7 +96,7 @@ export const PrescriptionCreator = ({form} : {form: any}) => {
}}> }}>
<Text <Text
style={{ style={{
color: Colors.green, color: "#000000",
}}> }}>
{field.question} {field.question}
</Text> </Text>