next.js/test/e2e/app-dir/use-server-inserted-html/app/css-in-js/styled-jsx.js
styled-jsx.js32 lines544 B
'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>
  )
}
Quest for Codev2.0.0
/
SIGN IN