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