reaction-component-library
reaction-component-library copied to clipboard
Line height on Input component is not set correctly
Type: minor
Describe the bug
The Input.lineHeight setting that applies to all input components is not being set on the actual <input> but rather on the wrapping div, which has no effect.
To Reproduce Steps to reproduce the behavior:
- Change
Input.lineHeightto something like'24px' - Find a text field (any textfield)
- Inspect element and see that the
line-height: 24pxCSS is being applied to the div and not to the input element.
Expected behavior
The line-height attribute should be applied to the actual <input> element.
Screenshots

If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Mac
- Browser: Chrome
- Version: 70
Additional context The reason this is a problem is because with the default font Source Sans Pro, the line-height of the input gets automatically set to 20px. But when I change the font to Roboto, the line-height gets automatically set to 18px. And because this is less than the height of the icon, the input field flickers and changes height when an icon appears.
This looks to be happening on the TextInput component but not on the Phone Number component. Not sure about others.
This should be easy to fix, could you elaborate if any other components have the same issue?