MCPcopy Create free account
hub / github.com/Paraboly/react-native-input-bar / InputBar

Class InputBar

lib/InputBar.tsx:61–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59interface IState {}
60
61class 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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected