()
| 46 | }; |
| 47 | |
| 48 | render() { |
| 49 | const { |
| 50 | iconClass, |
| 51 | iconColor, |
| 52 | iconSize, |
| 53 | iconName, |
| 54 | iconBackgroundColor, |
| 55 | style: containerStyle, |
| 56 | inputStyle, |
| 57 | height: inputHeight, |
| 58 | } = this.props; |
| 59 | const { |
| 60 | focusedAnim, |
| 61 | value, |
| 62 | } = this.state; |
| 63 | const AnimatedIcon = Animated.createAnimatedComponent(iconClass); |
| 64 | |
| 65 | return ( |
| 66 | <View |
| 67 | style={[styles.container, containerStyle]} |
| 68 | onLayout={this._onLayout} |
| 69 | > |
| 70 | <TouchableWithoutFeedback onPress={this.focus}> |
| 71 | <Animated.View |
| 72 | style={{ |
| 73 | backgroundColor: iconBackgroundColor, |
| 74 | justifyContent: 'center', |
| 75 | alignItems: 'center', |
| 76 | height: inputHeight, |
| 77 | width: focusedAnim.interpolate({ |
| 78 | inputRange: [0, 1], |
| 79 | outputRange: [60, 40], |
| 80 | }), |
| 81 | }} |
| 82 | > |
| 83 | <AnimatedIcon |
| 84 | name={iconName} |
| 85 | color={iconColor} |
| 86 | style={{ |
| 87 | fontSize: focusedAnim.interpolate({ |
| 88 | inputRange: [0, 1], |
| 89 | outputRange: [iconSize, iconSize * 0.6], |
| 90 | }), |
| 91 | }} |
| 92 | /> |
| 93 | </Animated.View> |
| 94 | </TouchableWithoutFeedback> |
| 95 | <TextInput |
| 96 | ref={this.input} |
| 97 | {...this.props} |
| 98 | style={[styles.textInput, inputStyle]} |
| 99 | value={value} |
| 100 | onBlur={this._onBlur} |
| 101 | onChange={this._onChange} |
| 102 | onFocus={this._onFocus} |
| 103 | underlineColorAndroid={'transparent'} |
| 104 | /> |
| 105 | </View> |
nothing calls this directly
no outgoing calls
no test coverage detected