This commit is contained in:
Horcrux
2017-01-16 21:01:12 +08:00
parent 5625f56d19
commit 43e45b95c5
3 changed files with 39 additions and 5 deletions

View File

@@ -17,6 +17,22 @@ class Text extends Shape {
textAnchor: PropTypes.oneOf(['start', 'middle', 'end'])
};
static childContextTypes = {
isInAParentText: React.PropTypes.bool
};
getChildContext() {
return {
isInAParentText: true
};
};
getContextTypes() {
return {
isInAParentText: React.PropTypes.bool
};
};
setNativeProps = (...args) => {
this.root.setNativeProps(...args);
};