* Fixed copyright date * Removed unnecessary components folder from channel scene * Added initial version of post textbox * Moved getTheme into a proper selector * Moved ChannelHeader into its own component * Flipped post list so that the most recent posts appear at the bottom * Moved post textbox value into redux view store * Switched new components from PureRenderMixin to React.PureComponent
32 lines
862 B
JavaScript
32 lines
862 B
JavaScript
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import React from 'react';
|
|
import {injectIntl, intlShape} from 'react-intl';
|
|
import {TextInput} from 'react-native';
|
|
|
|
class TextInputWithLocalizedPlaceholder extends React.PureComponent {
|
|
static propTypes = {
|
|
...TextInput.propTypes,
|
|
placeholder: React.PropTypes.object.isRequired,
|
|
intl: intlShape.isRequired
|
|
};
|
|
|
|
blur = () => {
|
|
this.refs.input.blur();
|
|
}
|
|
|
|
render() {
|
|
const {intl, placeholder, ...otherProps} = this.props;
|
|
|
|
return (
|
|
<TextInput
|
|
ref='input'
|
|
{...otherProps}
|
|
placeholder={intl.formatMessage(placeholder)}
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default injectIntl(TextInputWithLocalizedPlaceholder, {withRef: true});
|