I am trying to target the width of the , which is nested within in Input component:
<Input
name="sprintCycle"
type="number"
placeholder={t('team.sprint_cycle.placeholder')}
label={t('team.sprint_cycle.label')}
suffix={() => <span className="weeks-span">{t('weeks')}</span>}
required
/>
I used the the getBoundingClientRect(), but it seems to return null, for some reason.
let weeksSpan = document.querySelector("weeks-span");
let getWidth = weeksSpan.getBoundingClientRect().width;
const weeksSpanWidth = getWidth;
Any workaround ideas?