2021-01-04 18:29:02 +01:00
|
|
|
import { StyleConstants } from '@utils/styles/constants'
|
|
|
|
import { useTheme } from '@utils/styles/ThemeManager'
|
|
|
|
import React from 'react'
|
2022-12-31 00:07:28 +01:00
|
|
|
import { StyleProp, View, ViewStyle } from 'react-native'
|
2021-01-04 18:29:02 +01:00
|
|
|
|
|
|
|
export interface Props {
|
|
|
|
extraMarginLeft?: number
|
|
|
|
extraMarginRight?: number
|
2022-12-03 21:14:00 +01:00
|
|
|
style?: StyleProp<ViewStyle>
|
2021-01-04 18:29:02 +01:00
|
|
|
}
|
|
|
|
|
2022-12-03 21:14:00 +01:00
|
|
|
const ComponentSeparator: React.FC<Props> = ({
|
|
|
|
extraMarginLeft = 0,
|
|
|
|
extraMarginRight = 0,
|
|
|
|
style
|
|
|
|
}) => {
|
|
|
|
const { colors } = useTheme()
|
2021-01-04 18:29:02 +01:00
|
|
|
|
2022-12-03 21:14:00 +01:00
|
|
|
return (
|
|
|
|
<View
|
|
|
|
style={[
|
|
|
|
style,
|
|
|
|
{
|
2022-02-12 14:51:01 +01:00
|
|
|
backgroundColor: colors.backgroundDefault,
|
|
|
|
borderTopColor: colors.border,
|
2022-12-31 00:07:28 +01:00
|
|
|
borderTopWidth: 1,
|
2022-12-03 21:14:00 +01:00
|
|
|
marginLeft: StyleConstants.Spacing.Global.PagePadding + extraMarginLeft,
|
|
|
|
marginRight: StyleConstants.Spacing.Global.PagePadding + extraMarginRight
|
|
|
|
}
|
|
|
|
]}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|
2021-01-04 18:29:02 +01:00
|
|
|
|
|
|
|
export default ComponentSeparator
|