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:
Anton Nikolaev
2019-12-11 09:41:32 -08:00
committed by Facebook Github Bot
parent c3dfcbe601
commit c0f902f81a
119 changed files with 977 additions and 1004 deletions

View File

@@ -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),

View File

@@ -120,7 +120,7 @@ class Card extends React.Component<{
cursor: 'pointer',
}));
static Image = styled('div')({
static Image = styled.div({
backgroundSize: 'cover',
width: '100%',
paddingTop: '100%',