carbon-design-system / carbon-react-native

The React Native implementation of the Carbon Design System
https://carbon-design-system.github.io/carbon-react-native/
Apache License 2.0
30 stars 8 forks source link

Full width Text input error state and margin/padding to match design #128

Closed 0FPRlp5qT6gny3sL1zErysQfLswRfCoI8JRBp37 closed 1 year ago

0FPRlp5qT6gny3sL1zErysQfLswRfCoI8JRBp37 commented 1 year ago

The full width Text input in the Gray 10 Theme Mobile carbon Figma file includes an underline and error icon below: https://www.figma.com/file/O3KSDu2TWpMaazGkgsKqLA/(Beta)-Gray-10-Theme-Mobile---Carbon-Design-System?node-id=1880-6923&t=TO40aq4eUt9nqMHI-4

Using the FormItem type="text" component, it is possible to add style for the error state to include the underline and position the error message by passing componentProps.style to textInputProps. But since the error icon is within the input component the icon's position is out of sync with the design:

e6a3d3bb-29c4-40bd-96b5-7124e8292dab

Also, the bottom margin on the label should be 5px instead of 8:

e6a3d3bb-29c4-40bd-96b5-7124e8292dab

And the bottom margin on the error message should be 20px instead of 8:

f38912a3-8d99-462a-bb6e-c15ee55d1f6d

If there is another way to render this that we are not aware of please let us know.

dabrad26 commented 1 year ago

Adjusted some of the padding. However; the larger style changes going to hold off. As currently we piggy back off of standard form items and want to find a clean way to keep that.

dabrad26 commented 1 year ago

Added

Screenshot 2023-11-29 at 11 09 58 Screenshot 2023-11-29 at 11 09 51