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

How do you style the inner input? #169

Open
RichMatthews opened this issue May 28, 2020 · 2 comments
Open

How do you style the inner input? #169

RichMatthews opened this issue May 28, 2020 · 2 comments

Comments

@RichMatthews
Copy link

I'm passing in my styles object like so:

    const styles = {
        border: '1px solid #ff5a5f',
        borderRadius: '5px',
        color: '#ff5a5f',
        padding: '7px',
        margin: '5px',
        textAlign: 'center',
        outline: 'none',
        cursor: 'default',
    }
<AutosizeInput value={ppl} onChange={(e) => onChange(e, index)} style={styles} />

but this just styles the outer wrapping div

how do I style the inner input?

@ibraheemdev
Copy link

I was wondering the same thing. There is no documentation on this, yet the example shows padding on the inner input.

@ibraheemdev
Copy link

ibraheemdev commented Jun 4, 2020

Ah, I just took a look at the examples. Turns out you have to use the inputStyle or inputClassName props:
<AutosizeInput inputStyle={styles} />

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

2 participants