verdnatura-chat/app/containers/List/ListSeparator.tsx

31 lines
596 B
TypeScript
Raw Normal View History

import React from 'react';
import { View, StyleSheet } from 'react-native';
import { themes } from '../../constants/colors';
import { withTheme } from '../../theme';
const styles = StyleSheet.create({
separator: {
2019-12-04 16:39:53 +00:00
height: StyleSheet.hairlineWidth
}
});
2021-07-21 13:54:39 +00:00
type TListSeparator = {
style: object;
theme: string;
}
2021-07-21 13:54:39 +00:00
const ListSeparator = React.memo(({ style, theme }: TListSeparator) => (
2019-12-04 16:39:53 +00:00
<View
style={[
styles.separator,
style,
{ backgroundColor: themes[theme].separatorColor }
]}
/>
));
ListSeparator.displayName = 'List.Separator';
export default withTheme(ListSeparator);