React Native styling with conditional : <p>I'm new to react native. I'm trying to change the styling of the TextInput when there is an error.</p>

<p>How can I make my code not as ugly?</p>

<pre><code>&lt;TextInput
      style={touched &amp;&amp; invalid?
        {height: 40, backgroundColor: 'white', borderRadius: 5, padding: 10, borderWidth: 2, borderColor: 'red'} :
        {height: 40, backgroundColor: 'white', borderRadius: 5, padding: 10}}
&lt;/TextInput&gt;
</code></pre>
