Answers for "how to render the div conditional css class with react jsx?"

11

react conditional classname

<div className={`banner ${active ? "active" : ""}`}>{children}</div>
Posted by: Guest on May-04-2020
0

conditional style react

<ImageBackground source={Images.bg} style={ (navHeight==0) ? styles.bg1 : styles.bg2}>
Posted by: Guest on August-19-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language