Upgrade to emotion v10
Summary: React 16 is not compatible with react-emotion 9 (it prints warnings, see also https://github.com/emotion-js/emotion/issues/644). So we should upgrade to 10. Reviewed By: mweststrate Differential Revision: D18905889 fbshipit-source-id: c00d2dbbadb1c08544632cb9bfcd63f2b1818a25
This commit is contained in:
committed by
Facebook Github Bot
parent
c3dfcbe601
commit
c0f902f81a
@@ -12,13 +12,13 @@ For basic building blocks (views, texts, ...) you can use the styled object.
|
||||
```javascript
|
||||
import {styled} from 'flipper';
|
||||
|
||||
const MyView = styled('div')({
|
||||
const MyView = styled.div({
|
||||
fontSize: 10,
|
||||
color: colors.red
|
||||
});
|
||||
const MyText = styled('span')({ ... });
|
||||
const MyImage = styled('img')({ ... });
|
||||
const MyInput = styled('input')({ ... });
|
||||
const MyText = styled.span({ ... });
|
||||
const MyImage = styled.img({ ... });
|
||||
const MyInput = styled.input({ ... });
|
||||
```
|
||||
|
||||
## Extending Flipper Components
|
||||
@@ -46,7 +46,7 @@ The CSS-in-JS object passed to the styled components takes just any CSS rule, wi
|
||||
The style object can also be returned from a function for dynamic values. Props can be passed to the styled component using React.
|
||||
|
||||
```javascript
|
||||
const MyView = styled('div')(
|
||||
const MyView = styled.div(
|
||||
props => ({
|
||||
fontSize: 10,
|
||||
color: => (props.disabled ? colors.red : colors.black),
|
||||
|
||||
Reference in New Issue
Block a user