* Add linter rules for import order and type member delimiters * Remove unneeded group * Group all app/* imports before the internal imports * Move app/ imports before parent imports * Separate @node_modules imports into a different group * Substitute app paths by aliases * Fix @node_modules import order and add test related modules * Add aliases for types and test, and group import types
44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import PropTypes from 'prop-types';
|
|
import React, {PureComponent} from 'react';
|
|
import {View} from 'react-native';
|
|
|
|
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
|
|
|
|
const SEPARATOR_HEIGHT = 3;
|
|
|
|
export default class PostSeparator extends PureComponent {
|
|
static propTypes = {
|
|
theme: PropTypes.object.isRequired,
|
|
};
|
|
|
|
render() {
|
|
const {theme} = this.props;
|
|
const style = getStyleFromTheme(theme);
|
|
|
|
return (
|
|
<View style={[style.separatorContainer, style.postsSeparator]}>
|
|
<View style={style.separator}/>
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
|
|
const getStyleFromTheme = makeStyleSheetFromTheme((theme) => {
|
|
return {
|
|
separatorContainer: {
|
|
justifyContent: 'center',
|
|
flex: 1,
|
|
height: SEPARATOR_HEIGHT,
|
|
},
|
|
postsSeparator: {
|
|
height: 15,
|
|
},
|
|
separator: {
|
|
backgroundColor: changeOpacity(theme.centerChannelColor, 0.1),
|
|
height: 1,
|
|
},
|
|
};
|
|
});
|