40f4cf4866
Hiya! I was asked to add an example of how to use [Compiled](https://compiledcssinjs.com/) with Next.js, figured I might as well at it to the source 😄. Let me know if there's any changes needed.
19 lines
419 B
JavaScript
19 lines
419 B
JavaScript
import { ClassNames } from '@compiled/react'
|
|
import { error } from '../style/colors'
|
|
|
|
export const BoxStyles = ({ children }) => (
|
|
<ClassNames>
|
|
{({ css }) =>
|
|
children({
|
|
className: css`
|
|
display: flex;
|
|
width: 100px;
|
|
height: 100px;
|
|
border: 1px solid ${error};
|
|
padding: 8px;
|
|
flex-direction: column;
|
|
`,
|
|
})
|
|
}
|
|
</ClassNames>
|
|
)
|