2021-01-04 18:29:02 +01:00
|
|
|
import { StyleConstants } from '@utils/styles/constants'
|
|
|
|
import { useTheme } from '@utils/styles/ThemeManager'
|
|
|
|
import React from 'react'
|
|
|
|
import { StyleSheet, View } from 'react-native'
|
|
|
|
|
|
|
|
export interface Props {
|
|
|
|
extraMarginLeft?: number
|
|
|
|
extraMarginRight?: number
|
|
|
|
}
|
|
|
|
|
|
|
|
const ComponentSeparator = React.memo(
|
|
|
|
({ extraMarginLeft = 0, extraMarginRight = 0 }: Props) => {
|
|
|
|
const { theme } = useTheme()
|
|
|
|
|
|
|
|
return (
|
|
|
|
<View
|
|
|
|
style={{
|
2021-03-21 14:14:10 +01:00
|
|
|
backgroundColor: theme.backgroundDefault,
|
2021-01-04 18:29:02 +01:00
|
|
|
borderTopColor: theme.border,
|
|
|
|
borderTopWidth: StyleSheet.hairlineWidth,
|
|
|
|
marginLeft:
|
|
|
|
StyleConstants.Spacing.Global.PagePadding + extraMarginLeft,
|
|
|
|
marginRight:
|
|
|
|
StyleConstants.Spacing.Global.PagePadding + extraMarginRight
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
},
|
|
|
|
() => true
|
|
|
|
)
|
|
|
|
|
|
|
|
export default ComponentSeparator
|