mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
89691cbe0c
* [chore] styled-jsx-plugin-sass@0.2.0, show dynamic styled-jsx-plugin-sass had an update that now allows for sass and dynamic to live together. This updates that package and updates the example slightly to show how. * [fix] errant space in styled-jsx-scss example
25 lines
478 B
JavaScript
25 lines
478 B
JavaScript
const backgroundColor = '#eee'
|
|
|
|
export default () => (
|
|
<div className='hello'>
|
|
<p>Hello World</p>
|
|
<style jsx>{`
|
|
$color: red;
|
|
|
|
.hello {
|
|
background-color: ${backgroundColor};
|
|
padding: 100px;
|
|
text-align: center;
|
|
transition: 100ms ease-in background;
|
|
&:hover {
|
|
color: $color;
|
|
}
|
|
|
|
@media only screen and (max-width: 480px) {
|
|
font-size: 20px;
|
|
}
|
|
}
|
|
`}</style>
|
|
</div>
|
|
)
|