Skip to content

Commit

Permalink
(fix) Light theme for estimated DOB fields in the patient registratio…
Browse files Browse the repository at this point in the history
…n form (#1206)
  • Loading branch information
vasharma05 authored Jun 24, 2024
1 parent 1a8a555 commit 3ed6166
Showing 1 changed file with 28 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,40 +119,36 @@ export const DobField: React.FC = () => {
) : (
<div className={styles.grid}>
<div className={styles.dobField}>
<Layer>
<TextInput
id="yearsEstimated"
type="number"
name={yearsEstimated.name}
onChange={onEstimatedYearsChange}
labelText={t('estimatedAgeInYearsLabelText', 'Estimated age in years')}
invalid={!!(yearsEstimateMeta.touched && yearsEstimateMeta.error)}
invalidText={yearsEstimateMeta.error && t(yearsEstimateMeta.error)}
value={yearsEstimated.value}
min={0}
required
{...yearsEstimated}
onBlur={updateBirthdate}
/>
</Layer>
<TextInput
id="yearsEstimated"
type="number"
name={yearsEstimated.name}
onChange={onEstimatedYearsChange}
labelText={t('estimatedAgeInYearsLabelText', 'Estimated age in years')}
invalid={!!(yearsEstimateMeta.touched && yearsEstimateMeta.error)}
invalidText={yearsEstimateMeta.error && t(yearsEstimateMeta.error)}
value={yearsEstimated.value}
min={0}
required
{...yearsEstimated}
onBlur={updateBirthdate}
/>
</div>
<div className={styles.dobField}>
<Layer>
<TextInput
id="monthsEstimated"
type="number"
name={monthsEstimated.name}
onChange={onEstimatedMonthsChange}
labelText={t('estimatedAgeInMonthsLabelText', 'Estimated age in months')}
invalid={!!(monthsEstimateMeta.touched && monthsEstimateMeta.error)}
invalidText={monthsEstimateMeta.error && t(monthsEstimateMeta.error)}
value={monthsEstimated.value}
min={0}
{...monthsEstimated}
required={!yearsEstimateMeta.value}
onBlur={updateBirthdate}
/>
</Layer>
<TextInput
id="monthsEstimated"
type="number"
name={monthsEstimated.name}
onChange={onEstimatedMonthsChange}
labelText={t('estimatedAgeInMonthsLabelText', 'Estimated age in months')}
invalid={!!(monthsEstimateMeta.touched && monthsEstimateMeta.error)}
invalidText={monthsEstimateMeta.error && t(monthsEstimateMeta.error)}
value={monthsEstimated.value}
min={0}
{...monthsEstimated}
required={!yearsEstimateMeta.value}
onBlur={updateBirthdate}
/>
</div>
</div>
)}
Expand Down

0 comments on commit 3ed6166

Please sign in to comment.