ACTIVITY1
SHOW A HELLO MESSAGE ALONG WITH THE USERNAME WITH THE GIVEN TEXT COLOR.
TWO PROPS ARE GIVEN, USERNAME AND TEXTCOLOR.
ACTIVITY1.JSX
function Activity1({ userName, textColor }) {
let styles = { color: textColor };
return <h3 style={styles}> Hello!{userName}</h3>;
}
export default Activity1;
APP.JSX
import Activity1 from "./Activity1.jsx";
function App() {
// let name = "abhi";
// return <ProductTab />;
return(
<>
<Activity1 userName="abhii" textColor="yellow"/>
<Activity1 userName="ashwith" textColor="orange"/>
<Activity1 userName="bharath" textColor="red"/>
<Activity1 userName="vinay" textColor="red"/>
</>
)
}

Comments
Post a Comment