| 59 | interface IState {} |
| 60 | |
| 61 | class InputBar extends React.Component<IInputBarProps, IState> { |
| 62 | renderBarIconContainer = () => { |
| 63 | const { |
| 64 | onSendPress, |
| 65 | spinnerType, |
| 66 | spinnerSize, |
| 67 | spinnerColor, |
| 68 | spinnerStyle, |
| 69 | disableSendIcon, |
| 70 | secondaryIconOnPress, |
| 71 | disableSecondaryIcon, |
| 72 | ImageComponent = Image, |
| 73 | spinnerVisibility = false, |
| 74 | sendIconImageSource = require("./local-assets/send.png"), |
| 75 | secondaryIconImageSource = require("./local-assets/attachment.png"), |
| 76 | } = this.props; |
| 77 | |
| 78 | return ( |
| 79 | <View style={styles.barIconContainer}> |
| 80 | {!disableSecondaryIcon && ( |
| 81 | <RNBounceable |
| 82 | {...this.props} |
| 83 | style={styles.iconContainer} |
| 84 | onPress={secondaryIconOnPress} |
| 85 | > |
| 86 | <ImageComponent |
| 87 | style={styles.iconImageStyle} |
| 88 | source={secondaryIconImageSource} |
| 89 | /> |
| 90 | </RNBounceable> |
| 91 | )} |
| 92 | {spinnerVisibility ? ( |
| 93 | <Spinner |
| 94 | type={spinnerType} |
| 95 | size={spinnerSize} |
| 96 | color={spinnerColor} |
| 97 | style={spinnerStyle} |
| 98 | /> |
| 99 | ) : ( |
| 100 | !disableSendIcon && ( |
| 101 | <RNBounceable |
| 102 | {...this.props} |
| 103 | style={styles.iconContainer} |
| 104 | onPress={onSendPress} |
| 105 | > |
| 106 | <ImageComponent |
| 107 | source={sendIconImageSource} |
| 108 | style={styles.iconImageStyle} |
| 109 | /> |
| 110 | </RNBounceable> |
| 111 | ) |
| 112 | )} |
| 113 | </View> |
| 114 | ); |
| 115 | }; |
| 116 | |
| 117 | render() { |
| 118 | const { |
nothing calls this directly
no outgoing calls
no test coverage detected