Last active
March 7, 2018 05:38
Can we just plop some CSS right smack in the middle of our JavaScript code?!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
body { | |
font-family: Helvetica, sans-serif; | |
} | |
.header-text { | |
font-weight: bold; | |
font-size: 2em; | |
} | |
class MyComponent extends React.Component { | |
render() { | |
return ( | |
<div> | |
<h1 className="header-text">Hello there!</h1> | |
</div> | |
); | |
} | |
} | |
export default MyComponent; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No you cannot