2020-10-30 16:15:58 +00:00
|
|
|
import React from 'react';
|
2021-09-13 20:41:05 +00:00
|
|
|
import { StyleSheet, View } from 'react-native';
|
|
|
|
|
|
|
|
interface IHeaderButtonContainer {
|
|
|
|
children: JSX.Element;
|
|
|
|
left?: boolean;
|
|
|
|
}
|
2020-10-30 16:15:58 +00:00
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
flexDirection: 'row',
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center'
|
|
|
|
},
|
|
|
|
left: {
|
|
|
|
marginLeft: 5
|
|
|
|
},
|
|
|
|
right: {
|
|
|
|
marginRight: 5
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
const Container = ({ children, left = false }: IHeaderButtonContainer) => (
|
|
|
|
<View style={[styles.container, left ? styles.left : styles.right]}>{children}</View>
|
2020-10-30 16:15:58 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
Container.displayName = 'HeaderButton.Container';
|
|
|
|
|
|
|
|
export default Container;
|