Artal Druk преди 8 години
родител
ревизия
553615ae29
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4
    2
      src/RichTextToolbar.js

+ 4
- 2
src/RichTextToolbar.js Целия файл

@@ -31,9 +31,11 @@ export default class RichTextToolbar extends Component {
31 31
     onPressAddLink: PropTypes.func,
32 32
     onPressAddImage: PropTypes.func,
33 33
     selectedButtonStyle: PropTypes.object,
34
+    iconTint: PropTypes.any,
35
+    selectedIconTint: PropTypes.any,
34 36
     unselectedButtonStyle: PropTypes.object,
35 37
     renderAction: PropTypes.func,
36
-    iconMap: PropTypes.object
38
+    iconMap: PropTypes.object,
37 39
   };
38 40
 
39 41
   constructor(props) {
@@ -107,7 +109,7 @@ export default class RichTextToolbar extends Component {
107 109
           ]}
108 110
           onPress={() => this._onPress(action)}
109 111
       >
110
-        {icon ? <Image source={icon}/> : null}
112
+        {icon ? <Image source={icon} style={{tintColor: selected ? this.props.selectedIconTint : this.props.iconTint}}/> : null}
111 113
       </TouchableOpacity>
112 114
     );
113 115
   }