Upgrade to React 16

This commit is contained in:
Tom Moor
2017-11-10 13:42:33 -08:00
parent 0d1e1c71c6
commit 21c7cb93a2
16 changed files with 146 additions and 250 deletions

View File

@@ -1,6 +1,6 @@
// @flow
import React, { Component } from 'react';
import Portal from 'react-portal';
import { Portal } from 'react-portal';
import { findDOMNode, Node } from 'slate';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
@@ -112,7 +112,7 @@ export default class BlockInsert extends Component {
const style = { top: `${this.top}px`, left: `${this.left}px` };
return (
<Portal isOpened>
<Portal>
<Trigger active={this.active} style={style}>
<PlusIcon onClick={this.handleClick} color={color.slate} />
</Trigger>

View File

@@ -4,6 +4,7 @@ import styled from 'styled-components';
import CopyButton from './CopyButton';
import { color } from 'shared/styles/constants';
import type { Props } from '../types';
import 'shared/styles/prism.css';
export default function Code({ children, node, readOnly, attributes }: Props) {
const language = node.data.get('language') || 'javascript';

View File

@@ -1,6 +1,6 @@
// @flow
import React, { Component } from 'react';
import Portal from 'react-portal';
import { Portal } from 'react-portal';
import styled from 'styled-components';
import _ from 'lodash';
import type { State } from '../../types';
@@ -118,7 +118,7 @@ export default class Toolbar extends Component {
};
return (
<Portal isOpened>
<Portal>
<Menu active={this.state.active} innerRef={this.setRef} style={style}>
{link &&
<LinkToolbar