bitsongofficial / wallet-mobile

1 stars 2 forks source link

Text input errors #123

Closed EnricoBarbieri1997 closed 2 years ago

EnricoBarbieri1997 commented 2 years ago

Inputs are missing the design implementation for error tips and checking

EnricoBarbieri1997 commented 2 years ago

Error text should be moved a couple of pixel up image

We can improve on it by making errorMessage a string or array. Only the first element of the array will be shown. In this way we can provide a list of errors for fields having more than one.

Furthermore Input implementation is fine but in some places a Search element is used for text fields and it doesn't use Input internally so you can't pass errorMessage props to those

zheleznov163 commented 2 years ago

I'm aware of a problem with . Adding a new element was due to the need to use border when focusing on input. React Native styles do not implement the "box-sizing: content-box" CSS style, which causes the appearance of the box to be accompanied by a resizing of the element both externally and internally. This looks a little sloppy. In , I avoided this by adding a border with the background. I need some time to think of a generic component that will use different borders (focus, error) to mimic "content-box". If it's not critical now, it's easier to add the errorMessage functionality to , and later refactor and use one component

zheleznov163 commented 2 years ago

fixed