rsnext/examples/with-compiled-css/components/class-names-box.js
DOUGES 40f4cf4866
chore: adds compiled css example (#22786)
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.
2021-03-08 21:25:49 +00:00

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>
)