Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Created August 13, 2022 04:08
Show Gist options
  • Save SarahElson/dd63071a5757f10512f3642bb4488bde to your computer and use it in GitHub Desktop.
Save SarahElson/dd63071a5757f10512f3642bb4488bde to your computer and use it in GitHub Desktop.
How To Style And Write CSS In React
const Styles = {
divStyles: {
color: "red",
backgroundColor: "black",
fontSize: "20px",
fontWeight: "bold",
textAlign: "center",
padding: "1px",
margin: "10px",
},
pStyles: {
color: "Black",
backgroundColor: "white",
fontSize: "20px",
fontWeight: "bold",
textAlign: "center",
padding: "10px",
margin: "10px",
},
};
function App() {
return (
<div style={Styles.divStyles}>
<p style={Styles.pStyles}>
React is the most loved JavaScript Library, according to StackOverflow
survey' 2022
</p>
<p style={Styles.pStyles}>
React is the most starred Front-end library on Github
</p>
<p style={Styles.pStyles}>3 Million+ React projects arise in one week </p>
</div>
);
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment