how to conditionaly pass styles in js code example
Example 1: conditional style prop react
style={{ textDecoration: todo.completed && "line-through" }}
style={{ textDecoration: todo.completed ? "line-through" : 'none' }}
Example 2: conditional style react
<ImageBackground source={Images.bg} style={ (navHeight==0) ? styles.bg1 : styles.bg2}>