2021-09-13 20:41:05 +00:00
|
|
|
import React from 'react';
|
2022-01-17 16:10:39 +00:00
|
|
|
import { StyleSheet, View, ViewStyle } from 'react-native';
|
2021-09-13 20:41:05 +00:00
|
|
|
|
|
|
|
import { themes } from '../../constants/colors';
|
|
|
|
import { withTheme } from '../../theme';
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
separator: {
|
|
|
|
height: StyleSheet.hairlineWidth
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
interface IListSeparator {
|
2022-01-17 16:10:39 +00:00
|
|
|
style?: ViewStyle;
|
|
|
|
theme?: string;
|
2021-09-13 20:41:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const ListSeparator = React.memo(({ style, theme }: IListSeparator) => (
|
2022-01-17 16:10:39 +00:00
|
|
|
<View style={[styles.separator, style, { backgroundColor: themes[theme!].separatorColor }]} />
|
2021-09-13 20:41:05 +00:00
|
|
|
));
|
|
|
|
|
|
|
|
ListSeparator.displayName = 'List.Separator';
|
|
|
|
|
|
|
|
export default withTheme(ListSeparator);
|