Adapt note field for temperature and note

This commit is contained in:
bl00dymarie
2024-02-20 13:32:13 +01:00
parent 60010f9760
commit a152ca0f40
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ const SymptomBox = ({
<View style={styles.textContainer}> <View style={styles.textContainer}>
<AppText style={symptomNameStyle}>{t(symptom)}</AppText> <AppText style={symptomNameStyle}>{t(symptom)}</AppText>
{symptomDataToDisplay && ( {symptomDataToDisplay && (
<AppText style={textStyle} numberOfLines={3}> <AppText style={textStyle} numberOfLines={4}>
{symptomDataToDisplay} {symptomDataToDisplay}
</AppText> </AppText>
)} )}
+3 -1
View File
@@ -109,7 +109,7 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
const noteText = symptom === 'note' ? data.value : data.note const noteText = symptom === 'note' ? data.value : data.note
const inputProps = { const inputProps = {
multiline: true, multiline: true,
numberOfLines: 4, numberOfLines: 3,
scrollEnabled: true, scrollEnabled: true,
style: styles.input, style: styles.input,
textAlignVertical: 'top', textAlignVertical: 'top',
@@ -176,10 +176,12 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
/> />
</Segment> </Segment>
)} )}
{/* this code below applies to the note field in temperature and the note tracking category */}
{shouldShow(symptomConfig.note) && ( {shouldShow(symptomConfig.note) && (
<Segment style={styles.segmentBorder}> <Segment style={styles.segmentBorder}>
<AppText>{symtomPage[symptom].note}</AppText> <AppText>{symtomPage[symptom].note}</AppText>
<AppTextInput <AppTextInput
{...(symptom === 'temperature' ? { inputProps } : {})}
multiline={true} multiline={true}
onChangeText={onEditNote} onChangeText={onEditNote}
placeholder={sharedLabels.enter} placeholder={sharedLabels.enter}