Browse Source

icon image tint color

Artal Druk 8 years ago
parent
commit
553615ae29
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/RichTextToolbar.js

+ 4
- 2
src/RichTextToolbar.js View File

31
     onPressAddLink: PropTypes.func,
31
     onPressAddLink: PropTypes.func,
32
     onPressAddImage: PropTypes.func,
32
     onPressAddImage: PropTypes.func,
33
     selectedButtonStyle: PropTypes.object,
33
     selectedButtonStyle: PropTypes.object,
34
+    iconTint: PropTypes.any,
35
+    selectedIconTint: PropTypes.any,
34
     unselectedButtonStyle: PropTypes.object,
36
     unselectedButtonStyle: PropTypes.object,
35
     renderAction: PropTypes.func,
37
     renderAction: PropTypes.func,
36
-    iconMap: PropTypes.object
38
+    iconMap: PropTypes.object,
37
   };
39
   };
38
 
40
 
39
   constructor(props) {
41
   constructor(props) {
107
           ]}
109
           ]}
108
           onPress={() => this._onPress(action)}
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
       </TouchableOpacity>
113
       </TouchableOpacity>
112
     );
114
     );
113
   }
115
   }