mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
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]>
33 lines
535 B
JavaScript
33 lines
535 B
JavaScript
'use client'
|
|
|
|
import styled from 'styled-components'
|
|
|
|
const Button = styled.button`
|
|
display: inline-block;
|
|
border-radius: 3px;
|
|
padding: 0.5rem 0;
|
|
margin: 0.5rem 1rem;
|
|
width: 11rem;
|
|
color: blue;
|
|
border: 2px solid blue;
|
|
`
|
|
|
|
const Box = styled.div`
|
|
border: 1px solid blue;
|
|
padding: 8px;
|
|
margin: 8px 0;
|
|
`
|
|
|
|
const Title = styled.h3`
|
|
color: blue;
|
|
`
|
|
|
|
export default () => {
|
|
return (
|
|
<Box>
|
|
<Title>styled-components</Title>
|
|
<Button>{`💅 This area belongs to styled-components`}</Button>
|
|
</Box>
|
|
)
|
|
}
|