From 10887e8be6b06d7f2bc08f40d6a5001c3537b0f9 Mon Sep 17 00:00:00 2001 From: Harry Shoff Date: Thu, 23 Aug 2018 12:51:20 -0400 Subject: [PATCH] [text] add innerRef prop --- packages/vx-text/src/Text.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/vx-text/src/Text.js b/packages/vx-text/src/Text.js index 2abf97bc4..ba8c78433 100644 --- a/packages/vx-text/src/Text.js +++ b/packages/vx-text/src/Text.js @@ -82,6 +82,7 @@ class Text extends Component { angle, lineHeight, capHeight, + innerRef, ...textProps } = this.props; const { wordsByLines } = this.state; @@ -121,7 +122,13 @@ class Text extends Component { } return ( - + {wordsByLines.map((line, index) => ( @@ -151,7 +158,8 @@ Text.propTypes = { angle: PropTypes.number, textAnchor: PropTypes.oneOf(['start', 'middle', 'end', 'inherit']), verticalAnchor: PropTypes.oneOf(['start', 'middle', 'end']), - style: PropTypes.object + style: PropTypes.object, + innerRef: PropTypes.func }; export default Text;