react-input-autosize icon indicating copy to clipboard operation
react-input-autosize copied to clipboard

How do you style the inner input?

Open RichMatthews opened this issue 5 years ago • 2 comments

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?

RichMatthews avatar May 28 '20 16:05 RichMatthews

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

ibraheemdev avatar Jun 04 '20 01:06 ibraheemdev

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

ibraheemdev avatar Jun 04 '20 01:06 ibraheemdev