8eb82b3891
Converted 3 more examples to TypeScript. Individual contributions pushed as separate commits. ## Documentation / Examples - [X] Make sure the linting passes by running `pnpm build && pnpm lint` - [X] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
26 lines
539 B
TypeScript
26 lines
539 B
TypeScript
const backgroundColor = '#eee'
|
|
|
|
export default function Home() {
|
|
return (
|
|
<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>
|
|
)
|
|
}
|