Changeset View
Changeset View
Standalone View
Standalone View
native/chat/chat-input-bar.react.js
Show First 20 Lines • Show All 524 Lines • ▼ Show 20 Lines | return ( | ||||
{this.state.buttonsExpanded ? expandoButton : null} | {this.state.buttonsExpanded ? expandoButton : null} | ||||
<TouchableOpacity | <TouchableOpacity | ||||
onPress={this.showMediaGallery} | onPress={this.showMediaGallery} | ||||
activeOpacity={0.4} | activeOpacity={0.4} | ||||
> | > | ||||
<AnimatedView style={this.cameraRollIconStyle}> | <AnimatedView style={this.cameraRollIconStyle}> | ||||
<SWMansionIcon | <SWMansionIcon | ||||
name="image-1" | name="image-1" | ||||
size={24} | size={28} | ||||
color={`#${this.props.threadInfo.color}`} | color={`#${this.props.threadInfo.color}`} | ||||
/> | /> | ||||
</AnimatedView> | </AnimatedView> | ||||
</TouchableOpacity> | </TouchableOpacity> | ||||
<TouchableOpacity | <TouchableOpacity | ||||
onPress={this.props.openCamera} | onPress={this.props.openCamera} | ||||
activeOpacity={0.4} | activeOpacity={0.4} | ||||
disabled={!this.state.buttonsExpanded} | disabled={!this.state.buttonsExpanded} | ||||
> | > | ||||
<AnimatedView style={this.cameraIconStyle}> | <AnimatedView style={this.cameraIconStyle}> | ||||
<SWMansionIcon | <SWMansionIcon | ||||
name="camera" | name="camera" | ||||
size={24} | size={28} | ||||
color={`#${this.props.threadInfo.color}`} | color={`#${this.props.threadInfo.color}`} | ||||
/> | /> | ||||
</AnimatedView> | </AnimatedView> | ||||
</TouchableOpacity> | </TouchableOpacity> | ||||
{this.state.buttonsExpanded ? null : expandoButton} | {this.state.buttonsExpanded ? null : expandoButton} | ||||
</View> | </View> | ||||
</AnimatedView> | </AnimatedView> | ||||
<ClearableTextInput | <ClearableTextInput | ||||
▲ Show 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | class ChatInputBar extends React.PureComponent<Props, State> { | ||||
dismissKeyboard = () => { | dismissKeyboard = () => { | ||||
const { keyboardState } = this.props; | const { keyboardState } = this.props; | ||||
keyboardState && keyboardState.dismissKeyboard(); | keyboardState && keyboardState.dismissKeyboard(); | ||||
}; | }; | ||||
} | } | ||||
const unboundStyles = { | const unboundStyles = { | ||||
cameraIcon: { | cameraIcon: { | ||||
paddingBottom: Platform.OS === 'android' ? 12 : 11, | paddingBottom: Platform.OS === 'android' ? 11 : 8, | ||||
paddingRight: 4, | paddingRight: 5, | ||||
}, | }, | ||||
cameraRollIcon: { | cameraRollIcon: { | ||||
paddingBottom: Platform.OS === 'android' ? 12 : 11, | paddingBottom: Platform.OS === 'android' ? 11 : 8, | ||||
paddingRight: 6, | paddingRight: 5, | ||||
}, | }, | ||||
container: { | container: { | ||||
backgroundColor: 'listBackground', | backgroundColor: 'listBackground', | ||||
paddingLeft: Platform.OS === 'android' ? 10 : 5, | |||||
}, | }, | ||||
expandButton: { | expandButton: { | ||||
bottom: 0, | bottom: 0, | ||||
position: 'absolute', | position: 'absolute', | ||||
right: 0, | right: 0, | ||||
}, | }, | ||||
expandIcon: { | expandIcon: { | ||||
paddingBottom: Platform.OS === 'android' ? 13 : 11, | paddingBottom: Platform.OS === 'android' ? 13 : 11, | ||||
paddingRight: 2, | |||||
}, | }, | ||||
expandoButtons: { | expandoButtons: { | ||||
alignSelf: 'flex-end', | alignSelf: 'flex-end', | ||||
}, | }, | ||||
explanation: { | explanation: { | ||||
color: 'listBackgroundSecondaryLabel', | color: 'listBackgroundSecondaryLabel', | ||||
paddingBottom: 4, | paddingBottom: 4, | ||||
paddingTop: 1, | paddingTop: 1, | ||||
▲ Show 20 Lines • Show All 242 Lines • Show Last 20 Lines |