using with emotion/css #600
Answered
by
ben-rogerson
mh-alahdadian
asked this question in
General
-
I believe that emotion/css is faster than it's react and styled version because styles creation are outside of component render body |
Beta Was this translation helpful? Give feedback.
Answered by
ben-rogerson
Dec 30, 2021
Replies: 1 comment 2 replies
-
I haven't used this technique, but don't see why it wouldn’t work with twin - give this a try: import tw from "twin.macro";
import { css } from '@emotion/css'
;<div
className={css([
tw`bg-black`
])}
>
This has a black background.
</div> You can also get twin to provide the css import with a config like this:
then: import tw, { css } from "twin.macro"; |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
mh-alahdadian
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I haven't used this technique, but don't see why it wouldn’t work with twin - give this a try:
You can also get twin to provide the css import with a config like this:
then: