GoScrobble/web/node_modules/@emotion/react/README.md

49 lines
698 B
Markdown
Raw Normal View History

2022-04-25 02:47:15 +00:00
# @emotion/react
> Simple styling in React.
## Install
```bash
yarn add @emotion/react
```
## Usage
```jsx
/** @jsx jsx */
import { jsx, css, Global, ClassNames } from '@emotion/react'
render(
<div css={{ color: 'hotpink' }}>
<div
css={css`
color: green;
`}
/>
<Global
styles={{
body: {
margin: 0,
padding: 0
}
}}
/>
<ClassNames>
{({ css, cx }) => (
<div
className={cx(
'some-class',
css`
color: yellow;
`
)}
/>
)}
</ClassNames>
</div>
)
```
More documentation is available at https://emotion.sh.