<aside> π‘ μ¬μ€μ next.jsμ νμ€μ΄μ next.jsμμλ§ μ
</aside>
https://github.com/vercel/styled-jsx
<style>
νκ·Έ μμ μλ°μ€ν¬λ¦½νΈ λ¬Έμμ΄ νμμΌλ‘ μμ±global
μ λΆμ¬μ£Όλ©΄ μμ μ»΄ν¬λνΈλ μν₯μ μ€λ€.
<style *jsx global>*
...
const NavBar: NextPage = () => {
const router = useRouter();
return (
<nav>
<Link href="/">
<a>Home</a>
</Link>
<style jsx>{`
nav {
background-color: tomato;
}
a {
text-decoration: none;
}
`}</style>
</nav>
);
};
export default NavBar;