Files
2b99db07f7 Client component directive: use client (#41333)
Replace `'client'` with `'use client'` as client directive for client
components in RSC

x-ref: [slack
thread](https://vercel.slack.com/archives/C035J346QQL/p1665435520907559)

Co-authored-by: JJ Kasper <[email protected]>
2022-10-11 10:26:45 -07:00

32 lines
544 B
JavaScript

'use client'
import css from 'styled-jsx/css'
const buttonStyles = css`
button {
color: hotpink;
}
`
export default function Comp() {
return (
<div>
<style jsx>{`
h3 {
color: purple;
}
.box {
padding: 8px;
border: 2px solid purple;
}
`}</style>
<style jsx>{buttonStyles}</style>
<div className="box">
<h3>styled-jsx</h3>
<p>This area is rendered by styled-jsx</p>
<button>click</button>
</div>
</div>
)
}