Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error styling #12

Open
alz10 opened this issue Jan 5, 2021 · 5 comments
Open

error styling #12

alz10 opened this issue Jan 5, 2021 · 5 comments

Comments

@alz10
Copy link

alz10 commented Jan 5, 2021

I'd like to put some padding bottom on the text error so that it wont look confusing to the next textfield

@gabrieldonadel
Copy link
Owner

@alz10 Could you share your code for this screen?

@alz10
Copy link
Author

alz10 commented Jan 9, 2021

@gabrieldonadel

import React, { Component } from 'react'
import { OutlinedTextField } from 'rn-material-ui-textfield'

class Example extends Component {
 ........
  render() {
    return (
     <View>
       <OutlinedTextField label="Full Name" error={errors.fullname}" />
       <OutlinedTextField label="Emaill Address" error={errors.email} />
     </View>
    )
  }
}

I just wanna add some marginBottom when the error text appears so it doesn't get closer to another textfield's title specially in OutlinedTextField .

A prop errorStyle or errorComponent to fully customize the error text according to our desire design

Screenshot_2021-01-09-09-03-21-605_com lyqa cscreviewer

@Diwakar14
Copy link

You can apply some marginBottom on First input fields.

to make the appropriate spacing

@alz10
Copy link
Author

alz10 commented Jan 9, 2021

@Diwakar14

I already did that and yes it fixes the spacing problem but what if i want to fully customize the error text? For example i want to add an icon right beside it or make it a message badge. A prop errorStyle or renderErrorComponent is what makes it flexible. I hope @gabrieldonadel support it in the next updates....

@gabrieldonadel
Copy link
Owner

@alz10 I'll do some experiments with a renderErrorComponent prop and I'll let you know once I have a stable version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants