react-input-autosize
react-input-autosize copied to clipboard
How do you style the inner input?
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?
I was wondering the same thing. There is no documentation on this, yet the example shows padding on the inner input.
Ah, I just took a look at the examples. Turns out you have to use the inputStyle or inputClassName props:
<AutosizeInput inputStyle={styles} />