Skip to content

Commit

Permalink
Fixed @emotion/css mention in the TS doc page
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Dec 1, 2020
1 parent de378ab commit c521db9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ import { jsx } from '@emotion/react'
As a result you may be not able to use react fragment shorthand syntax - `<></>`, but still you can use `<Fragment></Fragment>`.
This is a limitation of the TypeScript compiler not being able to independently specify jsx pragma and jsxFrag pragma.

You can still use the css helper and pass the className yourself (ensure you are importing from the `@emotion` package, not `@emotion/react`).
You can still use the css helper and pass the className yourself (ensure you are importing from the `@emotion/css` package, not `@emotion/react`).

```tsx
import { css } from '@emotion'
import { css } from '@emotion/css'

<div className={css({ background: 'black' })} />
```
Expand Down

0 comments on commit c521db9

Please sign in to comment.