Skip to content

Commit

Permalink
add tree node style
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghb committed Aug 21, 2017
1 parent 6f5b314 commit 24694cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class Tree extends React.Component {
* @param {TreeNode} node
*/
renderItem(node) {
const {checkable, checkStrictly} = this.props;
const {checkable, checkStrictly,nodeStyle} = this.props;
let {expanded, selected} = this.state;
let {expandedKeys, selectedKeys, showLine, iconSize, expandIconSize} = this.props;
const {key, children, icon, label, disabled} = node;
Expand Down Expand Up @@ -331,7 +331,7 @@ class Tree extends React.Component {

let textNode;
if (typeof label === 'string') {
textNode = <Text style={textStyle}>{label} </Text>
textNode = <Text style={[textStyle,nodeStyle]}>{label} </Text>
} else {
textNode = <View>{label}</View>
}
Expand Down

0 comments on commit 24694cc

Please sign in to comment.