Chats: add label to send button

This commit is contained in:
Alex Gleason 2020-09-22 14:21:07 -05:00
parent 3b8eed17b6
commit 2dd3b39e7e
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -18,6 +18,7 @@ import IconButton from 'soapbox/components/icon_button';
const messages = defineMessages({
placeholder: { id: 'chat_box.input.placeholder', defaultMessage: 'Send a message…' },
send: { id: 'chat_box.actions.send', defaultMessage: 'Send' },
});
const mapStateToProps = (state, { chatId }) => ({
@ -164,11 +165,17 @@ class ChatBox extends ImmutablePureComponent {
}
renderActionButton = () => {
const { intl } = this.props;
const { resetFileKey } = this.state;
return this.canSubmit() ? (
<div className='chat-box__send'>
<IconButton icon='send' size={16} onClick={this.sendMessage} />
<IconButton
icon='send'
title={intl.formatMessage(messages.send)}
size={16}
onClick={this.sendMessage}
/>
</div>
) : (
<UploadButton onSelectFile={this.handleFiles} resetFileKey={resetFileKey} />