|
@@ -31,7 +31,8 @@ export default class RichTextToolbar extends Component {
|
31
|
31
|
onPressAddLink: PropTypes.func,
|
32
|
32
|
onPressAddImage: PropTypes.func,
|
33
|
33
|
selectedButtonStyle: PropTypes.object,
|
34
|
|
- unselectedButtonStyle: PropTypes.object
|
|
34
|
+ unselectedButtonStyle: PropTypes.object,
|
|
35
|
+ renderAction: PropTypes.func
|
35
|
36
|
};
|
36
|
37
|
|
37
|
38
|
constructor(props) {
|
|
@@ -84,7 +85,7 @@ export default class RichTextToolbar extends Component {
|
84
|
85
|
return this.props.unselectedButtonStyle ? this.props.unselectedButtonStyle : styles.defaultUnselectedButton;
|
85
|
86
|
}
|
86
|
87
|
|
87
|
|
- _renderAction(action, selected) {
|
|
88
|
+ _defaultRenderAction(action, selected) {
|
88
|
89
|
return (
|
89
|
90
|
<TouchableOpacity
|
90
|
91
|
key={action}
|
|
@@ -101,6 +102,12 @@ export default class RichTextToolbar extends Component {
|
101
|
102
|
);
|
102
|
103
|
}
|
103
|
104
|
|
|
105
|
+ _renderAction(action, selected) {
|
|
106
|
+ return this.props.renderAction ?
|
|
107
|
+ this.props.renderAction(action, selected) :
|
|
108
|
+ this._defaultRenderAction(action, selected);
|
|
109
|
+ }
|
|
110
|
+
|
104
|
111
|
render() {
|
105
|
112
|
return (
|
106
|
113
|
<View
|