Browse Source

Support RN 0.51.0

Eden Gottlieb 7 years ago
parent
commit
c97afb15cd
2 changed files with 6 additions and 4 deletions
  1. 4
    3
      src/RichTextEditor.js
  2. 2
    1
      src/RichTextToolbar.js

+ 4
- 3
src/RichTextEditor.js View File

1
-import React, {Component, PropTypes} from 'react';
1
+import React, {Component} from 'react';
2
+import PropTypes from 'prop-types';
2
 import WebViewBridge from 'react-native-webview-bridge-updated';
3
 import WebViewBridge from 'react-native-webview-bridge-updated';
3
 import {InjectedMessageHandler} from './WebviewMessageHandler';
4
 import {InjectedMessageHandler} from './WebviewMessageHandler';
4
 import {actions, messages} from './const';
5
 import {actions, messages} from './const';
92
     const editorAvailableHeight = Dimensions.get('window').height - keyboardHeight - spacing;
93
     const editorAvailableHeight = Dimensions.get('window').height - keyboardHeight - spacing;
93
     this.setEditorHeight(editorAvailableHeight);
94
     this.setEditorHeight(editorAvailableHeight);
94
   }
95
   }
95
-  
96
+
96
   onBridgeMessage(str){
97
   onBridgeMessage(str){
97
     try {
98
     try {
98
       const message = JSON.parse(str);
99
       const message = JSON.parse(str);
352
       selectionChangeListeners: [...this.state.selectionChangeListeners, listener]
353
       selectionChangeListeners: [...this.state.selectionChangeListeners, listener]
353
     });
354
     });
354
   }
355
   }
355
-  
356
+
356
   enableOnChange() {
357
   enableOnChange() {
357
     this._sendAction(actions.enableOnChange);
358
     this._sendAction(actions.enableOnChange);
358
   }
359
   }

+ 2
- 1
src/RichTextToolbar.js View File

1
-import React, {Component, PropTypes} from 'react';
1
+import React, { Component } from 'react';
2
+import PropTypes from 'prop-types';
2
 import {ListView, View, TouchableOpacity, Image, StyleSheet} from 'react-native';
3
 import {ListView, View, TouchableOpacity, Image, StyleSheet} from 'react-native';
3
 import {actions} from './const';
4
 import {actions} from './const';
4
 
5