UNPKG

437 BMarkdownView Raw
1# @emotion/styled
2
3> The styled API for @emotion/react
4
5## Install
6
7```bash
8yarn add @emotion/react @emotion/styled
9```
10
11## Usage
12
13```jsx
14import styled from '@emotion/styled'
15
16let SomeComp = styled.div({
17 color: 'hotpink'
18})
19
20let AnotherComp = styled.div`
21 color: ${props => props.color};
22`
23
24render(
25 <SomeComp>
26 <AnotherComp color="green" />
27 </SomeComp>
28)
29```
30
31More documentation is available at https://emotion.sh/docs/styled.