mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-01 14:25:08 +08:00
Add support for drawableLeft and drawablePadding props
Summary: Add support inlining images into text inputs. For now this is only available on Android. Reviewed By: andreicoman11 Differential Revision: D3470805 fbshipit-source-id: 14db05ec4d5af549bf314b903654314f39bf73ea
This commit is contained in:
committed by
Facebook Github Bot 8
parent
54ed44628d
commit
eafc5dac62
@@ -419,6 +419,18 @@ const TextInput = React.createClass({
|
||||
* @platform android
|
||||
*/
|
||||
underlineColorAndroid: ColorPropType,
|
||||
|
||||
/**
|
||||
* If defined, the provided image resource will be rendered on the left.
|
||||
* @platform android
|
||||
*/
|
||||
inlineImageLeft: PropTypes.string,
|
||||
|
||||
/**
|
||||
* Padding between the inline image, if any, and the text input itself.
|
||||
* @platform android
|
||||
*/
|
||||
inlineImagePadding: PropTypes.number,
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -638,6 +650,8 @@ const TextInput = React.createClass({
|
||||
selectionColor={this.props.selectionColor}
|
||||
text={this._getText()}
|
||||
underlineColorAndroid={this.props.underlineColorAndroid}
|
||||
inlineImageLeft={this.props.inlineImageLeft}
|
||||
inlineImagePadding={this.props.inlineImagePadding}
|
||||
children={children}
|
||||
editable={this.props.editable}
|
||||
selectTextOnFocus={this.props.selectTextOnFocus}
|
||||
|
||||
Reference in New Issue
Block a user